Home |
Search |
Today's Posts |
#1
|
|||
|
|||
filename!macroname as variables
Hello everyone,
I know when you call a macro which lies in an external excel file, you reference it by: filename!macroname, so it will look like something below: oExcel.Run "'D:\myExcelFile.xls'!myMacro" Now i want to put the file name and macro name into a variable, as it can change, but i need to know the SYNTAX to do this; sample code is below: Dim myFileName As String Dim myMacro As String myFileName = "'D:\myExcelFile.xls'" myMacro = "myMacro" oExcel.Run THEN I DONT KNOW THE SYNTAX, eveything i tried hast worked. Thanks in advance, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
filename.xls:1 and filename.xls:2 | Excel Discussion (Misc queries) | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
+ in filename | Excel Discussion (Misc queries) | |||
set filename to <filename-date on open | Excel Worksheet Functions |