Application.run problem

S

simoncohen

I have the following line in a macro in thw workbook xxx.xls

Application.Run" 'xxx.xls'!macro1 "

If I save this file as say yyy.xls I will need to change the code i
the macro to reflect this. Can I put some sort of variable in the macr
to represent the current open file ?

Thank
 
F

Frank Stone

drop the file name. it is not needed if macro is run in
the file in which it resides.
also if you are using application.run, that is telling me
that it is in a module that is runing a second macro.
you can also use the call function instead of the
applicaiton.run i.e.

Call YourMacroName

either way works. I usually use call.(less typing)
 
Top