PDA

View Full Version : Batch file



Ashes.cfg
10-03-2007, 11:01 AM
guys how to run a vba code by a batch file
like fpr cqperl i can write a batch file sayin
cqperl filename.pl

how to make a batch file which will execute a vba code?

asking this in this section as vba code is in excel(although tht doesnt matter much)

Bob Phillips
10-03-2007, 11:12 AM
Why not rewrite it as VBScript. It is very similar, just that there are no variable type declarations, they all defdault.

VBScript can be run in batch mode.

lucas
10-03-2007, 11:13 AM
@start Book1.xls

in the first line of a file named filname.bat will start Book1.xls if it is in the same directory. It won't run any VBA for you unless Book1.xls has on open event code in it.

Ashes.cfg
10-03-2007, 11:22 AM
hmm thanks..actually my problem is little bit complicated to type out correctly..but i am giving it a try....this is what my program should do
1)open a browser dialog window...
2)when i click on a particular xls file it opens tht file...
3)executes the vba code i have developed
4)the modifications(result) obtained are stored either in the same xls file as new sheet.. or as a new workbook altogether!

Note : the help i had taken earlier is used to develop the vba code i.e deleting empty rows etc etc!

P.S : my god u guys are quick :D !! thanks a lot guys!!