akinator
07-21-2005, 11:52 AM
Hey Folks.
Kindofa continuation from a prior solved post.
WIth two workbooks open, I'm trying to execute the following command from "workbook1.xls" to run a macro in a different workbook "Myfile(Orders).xls":
Application.Run "Myfile(Orders)!TestMyClass"
This command works fine with a regular file name, however if the filename has any characters that are illegal for a macro (i.e. parentheses) it blows up. I could rename the files that are to be run, however I'd rather not. I tried playing around with the workbooks.Item to get the id
Workbooks(WkbkId).Application.Run ("TestMyClass")
- to no avail.
It's quite possible that I may just have to bite the bullet and rename a bunch of files. Any ideas?
Thanks
AK
Kindofa continuation from a prior solved post.
WIth two workbooks open, I'm trying to execute the following command from "workbook1.xls" to run a macro in a different workbook "Myfile(Orders).xls":
Application.Run "Myfile(Orders)!TestMyClass"
This command works fine with a regular file name, however if the filename has any characters that are illegal for a macro (i.e. parentheses) it blows up. I could rename the files that are to be run, however I'd rather not. I tried playing around with the workbooks.Item to get the id
Workbooks(WkbkId).Application.Run ("TestMyClass")
- to no avail.
It's quite possible that I may just have to bite the bullet and rename a bunch of files. Any ideas?
Thanks
AK