Macro attached to Menu Command Button
hi
you don't.
file1 macro is the master macro that call the other macro in file 2. the
master macro ends when it hits it's end sub not the end sub in macro 2 in
file 2. so you are trying to close a file that still has a macro running.
opps. error. sorry no way around that. macro 1 must complete before closeing.
Regards
FSt1
"Steven" wrote:
I assigned a macro to a Menu Command Button in File1 that opens another file
(File2) and then the File1 macro continues and calls a macro in File2 with
Application.Run "..." and then after the macro in File2 has run the last line
of code in the macro of File1 is to close File1,
Windows("File1.xls").Close(0). But I get an "Appliation Defined Error!"
Note: I dont want to go directly to File2 from the Command Button. I want
to use File1's macro assigned to the Command Button.
How do I do this and not get the error?
Thank you,
Steven
|