Wanted: Syntax for Filename changed without impacting Macro

  • Thread starter Thread starter bluegrassstateworker
  • Start date Start date
B

bluegrassstateworker

Hello,
I have the following line of code that was created by the macro
recorder:

Application.Run "CHFSform98g2.xls!S6Exp"

This runs a macro in the current spreadsheet called S6Exp. My dilema
is that the name of the spreadsheet (CHFSform98g2) changes, creating an
error in the macro. Is there a good syntax that will run S6Exp
regardless of the filename?

Thanks
 
I guess with the holidays my mind is somewhere else; perhaps in a
sugar-buzz haze.....

I used the CALL command:
CALL S6Exp
and that worked! Merry Christmas everyone!
-- A
 

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