ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running an external Macro (https://www.excelbanter.com/excel-programming/332696-running-external-macro.html)

[email protected]

Running an external Macro
 
How do I get this to work?

Private Sub btnUpdateLifeCycle_Click()
Dim strMacro As String

strMacro = "\\arlfs03\shared\Engineering\ENG\BOM Archive\" & "'" &
"BOM_Macros.xls" & "'" & "!UPDATE_LIFECYCLE_SUMMARY"

Run (strMacro)

End Sub

I want to fire off a macro without having to open and close the
workbook containing the macro.


Tom Ogilvy

Running an external Macro
 
You have to open the workbook. The macro is data in a file - Excel
interprets it, makes it executable code and executes the code. To do this,
it has to open the workbook.

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
How do I get this to work?

Private Sub btnUpdateLifeCycle_Click()
Dim strMacro As String

strMacro = "\\arlfs03\shared\Engineering\ENG\BOM Archive\" & "'" &
"BOM_Macros.xls" & "'" & "!UPDATE_LIFECYCLE_SUMMARY"

Run (strMacro)

End Sub

I want to fire off a macro without having to open and close the
workbook containing the macro.





All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com