View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Wanted: Syntax for Filename changed without impacting Macro

Is S6Exp a procedure in the same workbook's project?

If yes:
call S6Exp



bluegrassstateworker wrote:

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


--

Dave Peterson