Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How can a macro can run automatically when a work book open
or hitting refresh data? Thnks Daniel |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put the code (or a call to the routine) in the
Workbook_OPEN() event processor to get it to run when the workbook is open. To get to that place, right-click the Excel icon to the left of the File entry in the menu bar and choose [View Code] from the list. When the VB Editor opens there'll be 2 drop-down lists available at the top. Use the one one the left and choose WORKBOOK from its list. The default procedure created will be Private Sub Workbook_Open() End Sub You can either put the code to be run within that section (between Private... and End Sub). Or just a call to the name of a routine located elsewhere. Not certain about data refresh - try doing the same thing with Worksheet_Change() event (right-click worksheet's name tab and choose View Code from its list). In this case the default is Worksheet_SelectionChange() which you don't want, so choose plain Change from the right-hand dropdown for that code module. I'm just not positive right this minute that the Change event triggers on a data refresh. "Daniel" wrote: How can a macro can run automatically when a work book open or hitting refresh data? Thnks Daniel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically Run macro | Setting up and Configuration of Excel | |||
Automatically run a macro | Excel Discussion (Misc queries) | |||
Macro to automatically run | Excel Discussion (Misc queries) | |||
Run macro automatically. | New Users to Excel | |||
Automatically run Macro | Excel Discussion (Misc queries) |