Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to autorun a macro from personal.xls?
i need the workbook to auto run the macro from personal.xls once i open the
workbok?how can i do that? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to autorun a macro from personal.xls?
Open your VBA editor with Alt + f11 and double click "This Workbook". Use:
Private Sub Workbook_Open() MyMacro 'The name of your macro End Sub The open event will initiate your macro. "violet" wrote: i need the workbook to auto run the macro from personal.xls once i open the workbok?how can i do that? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to autorun a macro from personal.xls?
but my macro is store in personal.xsl. so what the code to call that macro.i
only know how to call macro that is store in that workbook but not on another workbook. "JLGWhiz" wrote: Open your VBA editor with Alt + f11 and double click "This Workbook". Use: Private Sub Workbook_Open() MyMacro 'The name of your macro End Sub The open event will initiate your macro. "violet" wrote: i need the workbook to auto run the macro from personal.xls once i open the workbok?how can i do that? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to autorun a macro from personal.xls?
I suppose the simplest way would be to copy the macro from personal.xls to
the other workbook and then use the Workbook_Open method to run the macro. If your macro is in the code module, you open the module with Alt+f11 while you have both workbooks open. In the project window on the left of the screen you can select the code module for Personal.xls to get the code you want to copy and then scroll to the code module for the other workbook and paste the code in that workbook code module. Then save the workbooks and the macro will be available in both workbooks. If this is confusing to you, you need to get someone in your office who works with code to help. "violet" wrote: but my macro is store in personal.xsl. so what the code to call that macro.i only know how to call macro that is store in that workbook but not on another workbook. "JLGWhiz" wrote: Open your VBA editor with Alt + f11 and double click "This Workbook". Use: Private Sub Workbook_Open() MyMacro 'The name of your macro End Sub The open event will initiate your macro. "violet" wrote: i need the workbook to auto run the macro from personal.xls once i open the workbok?how can i do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
autorun a macro | Excel Programming | |||
Autorun Macro | Excel Discussion (Misc queries) | |||
Autorun macro | Excel Worksheet Functions | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming | |||
Autorun a macro | Excel Programming |