Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wanted: Syntax for Filename changed without impacting Macro
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wanted: Syntax for Filename changed without impacting Macro
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 Jim Jackson wrote: You should be able to change the line to Application.Run "S6Exp" and have it work. -- Best wishes, Jim "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Impacting a cell | Excel Discussion (Misc queries) | |||
Insert a filename that will automatically update if changed. | Excel Worksheet Functions | |||
I wanted Excel's appearence changed to Olive green | New Users to Excel | |||
syntax for filename:= | Excel Programming | |||
VBA - Syntax filename rangename for vlookup formula | Excel Programming |