Asked by duncanb7
at 2024-11-03 14:12:21
Point:250 Replies:14 POST_ID:828407USER_ID:11059
Topic:
MS DOS;Microsoft Office Suite;Microsoft Excel Spreadsheet Software
I would like to run excel file, myfile.xls, with macro, main(), at command line(C:) in Window Vista, I try
this several ways but it fail and only Excel window is activated and report no such file
of myfile.xls!main, please advise since I would like put the command
in Window's Schtask for automation excel macro running.
1----C:>excel.exe D:datamyfile.xls!main
2----C:>excel.exe D:data'myfile.xls'!main
3-----C:>excel.exe D:data"'myfile.xls'!main"
4-C:>excel.exe "D:data'myfile.xls'!main"
All 4 tries are failed, I tried it in VBA that is okay
chdir D:data
application.run "'myfile'!main"
Duncan
this several ways but it fail and only Excel window is activated and report no such file
of myfile.xls!main, please advise since I would like put the command
in Window's Schtask for automation excel macro running.
1----C:>excel.exe D:datamyfile.xls!main
2----C:>excel.exe D:data'myfile.xls'!main
3-----C:>excel.exe D:data"'myfile.xls'!main"
4-C:>excel.exe "D:data'myfile.xls'!main"
All 4 tries are failed, I tried it in VBA that is okay
chdir D:data
application.run "'myfile'!main"
Duncan