Thursday, June 3, 2010

Healthy Eating Slogans 2010

Run macros of several books

'Run Macro from different books

Sometimes it may be useful to have our books grouped into different macros in Excel or Excel add-ins for

The sgte macro "Exe_From_otroAddin" shows how simple external macro is run


Sub exe_From_otroAddin () Dim

MyTool As String Dim
NameFile
As String Dim As String
NameProcedure
NameFile = "Addin_new.xla" 'First Save the name of the book or supplement where the macro

NameProcedure = "Macro_otroAddin"' indicates the name of the macro
Addin_new.xla

MyTool = "'" & NameFile & "'!" & NameProcedure 'Finally, concatenate the name of the add-in for Excel (NameFile)
with the name of the macro (NameProcedure) Application.Run



MyTool' run the external macro End Sub


0 comments:

Post a Comment