I am very new with VBA so bear with me.
How do I get VBA to select many files from a folder and put them in in another folder with a slightly altered name?
I have tried to simplify my particular problem into a more general question....
my specific problem is:
I have figured out how VBA (in excel) can operate other programs. (using shell and sendkeys) I am writing a VBA macro to automate a program that translates one type of file into another one.
I want to avoid mistakes and tedious button clicking and keystrokes that this program requires. If I can figure out how VBA can select files one by one, rename them, and stick them in another folder I will be long on my way..
my program so far
Sub FormatFVS()
Shell "c:/Fvsbin/Format4FVS.exe", vbNormalFocus
SendKeys "^o", True
ChDir "c:/Fvsn"
SendKeys "C:\Fvsbin\settings.fmt {ENTER} {TAB} ", True
SendKeys "%b M:\wfolder\mon98-Plot10.txt {ENTER} ", True
SendKeys "%a ", True
SendKeys " C:\Fvsta\Mon98\plots\test.fvs {ENTER}", True
SendKeys "{ENTER} ", True
SendKeys "{ENTER} ", True
End Sub
thank you
How do I get VBA to select many files from a folder and put them in in another folder with a slightly altered name?
I have tried to simplify my particular problem into a more general question....
my specific problem is:
I have figured out how VBA (in excel) can operate other programs. (using shell and sendkeys) I am writing a VBA macro to automate a program that translates one type of file into another one.
I want to avoid mistakes and tedious button clicking and keystrokes that this program requires. If I can figure out how VBA can select files one by one, rename them, and stick them in another folder I will be long on my way..
my program so far
Sub FormatFVS()
Shell "c:/Fvsbin/Format4FVS.exe", vbNormalFocus
SendKeys "^o", True
ChDir "c:/Fvsn"
SendKeys "C:\Fvsbin\settings.fmt {ENTER} {TAB} ", True
SendKeys "%b M:\wfolder\mon98-Plot10.txt {ENTER} ", True
SendKeys "%a ", True
SendKeys " C:\Fvsta\Mon98\plots\test.fvs {ENTER}", True
SendKeys "{ENTER} ", True
SendKeys "{ENTER} ", True
End Sub
thank you