Application.run problem

  • Thread starter Thread starter simoncohen
  • Start date Start date
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top