write a macro to run a macro
Sorry, I am not understanding. Your verbiage "'Call a macro previously written
Application.Run "Book1!MyMacro"" waht does that mean? Do I insert the name of my Macro(s) here, or the name or my workbook? I presume that Book1!MyMacro would be the name of my macro? So does that mean Application.Run will execute it?
I'm very much a macro novice.
Thanks
--
Allan
"Luke M" wrote:
Yes. From the VBE, under the ThisWorkbook module, you can use something like
this:
Private Sub Workbook_Open()
'Call a macro previously written
Application.Run "Book1!MyMacro"
'Any other coding you want to run
End Sub
Note that there are many other events you can use to automatically activate
macros.
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"Flipper" wrote:
Can a user write a mcaro that will automatically execute when the file is
opened?
--
Allan
|