Help me with my doubts ???
1. Creating a new Excel using an existing VBA.( create a new file in directory,Saving the existing file in the a directory and saving it as some other file in a directory)-separate codes are needed.
2. Function for splitting numbers. ( opposite of concatenate fn.)
i.e. If i have a number 123 it should get split into individual digits ( 1,2 and 3 )
3.Opening a new application using an excel vba ( opening mozilla firefox )
4.The user form should remember the values entered previously.
Re: Help me with my doubts ???
Hi there,
Well for the first question you can use a shell command like the following:
Code:
Program = "C:\Program Files\KeditW\KEDITW32.exe c:\Temp\Book1.prn (PROFILE CLEANUP"
TaskID = Shell(Program, 1)
For the second question, it depends on the amount of numbers you have welded or concatenated together. If its just three then thats simple use the following:
Code:
=right(A2,1)
=left(A2,1)
=mid"(A2,2,1)
With your last question it is something I have not attempted myself but I seem to remember something about declaring public variables :(
Re: Help me with my doubts ???
thank you mate....but Does the above codes work in vba ???
i want it to be a macros function.....
esp 2nd one.. " = right(a2,1) " this is used in excel isn't it. direct function of excel
Re: Help me with my doubts ???
Also 1 more Query..
I have a big bunch of codes built in the user forum under a command button control..but i have to make this program into different modules so that it is easily understandable..how can make it....I don't to how to declare it...even if i declare it is displaying a Object Error.,
i think the module couldn't access the objects placed in my user forum....
how to create these things into different modules....
Re: Help me with my doubts ???
for 2) if the number can be an unknown length the above codes are only for 3 digit, so try like
vb Code:
Function splitnum(num) As Variant
Dim myarr() As Variant
ReDim myarr(Len(num) - 1)
For i = 1 To Len(num)
myarr(i - 1) = Mid(num, i, 1)
Next
splitnum = myarr
End Function
Sub test()
s = splitnum(465656456)
End Sub
Quote:
i think the module couldn't access the objects placed in my user forum....
objects on the form must be prefixed with the form name
like userform1.textbox1