Expanding a little on thydzik's suggestion...
Dim xlApp, xlWb
Set xlApp = CreateObject("Excel.Applic
Set xlWb = xlApp.Workbooks.Open("c:\f
xlApp.Run "'" & xlWb.Name & "'!NameOfMacro"
' if macro has arguments...
'xlApp.Run "'" & xlWb.Name & "'!NameOfMacro", "a", "b", "c"
xlWb.Close True
Set xlWb = Nothing
xlApp.Quit
Set xlApp = Nothing
Main Topics
Browse All Topics





by: thydzikPosted on 2009-10-20 at 20:55:47ID: 25620720
the following code we do this to an already opened workbook
where 'test1' is the workbook name
and 'runme' is the public macro name.
Select allOpen in new window