Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do you do the following using VBA macro automatically?
Hi all,
I would like to have the following run every time when the Excel 2003 sheet is opened: so I am going to put the VBA macro into AUTO_RUN function... Now when the Excel 2003 file is opened, I need the following: 1. refresh/recalculate all the sheets in the Excel 2003 file; 2. save all the sheets; 3. close out the file. Please help me translate these into VBA/MACRO... thanks a lot! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do you do the following using VBA macro automatically?
Excel has no AUTO_RUN function.
Did you mean Auto_Open? I would put this code into Thisworkbook Module. Private Sub Workbook_Open() Application.Calculate With ThisWorkbook .Save .Close End With End Sub But note...............you will have to disable events if you ever want to keep the workbook open for editing. Gord Dibben MS Excel MVP On Tue, 4 May 2010 12:13:34 -0700 (PDT), LunaMoon wrote: Hi all, I would like to have the following run every time when the Excel 2003 sheet is opened: so I am going to put the VBA macro into AUTO_RUN function... Now when the Excel 2003 file is opened, I need the following: 1. refresh/recalculate all the sheets in the Excel 2003 file; 2. save all the sheets; 3. close out the file. Please help me translate these into VBA/MACRO... thanks a lot! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro run automatically | Excel Discussion (Misc queries) | |||
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) | |||
Automatically run Macro | Excel Discussion (Misc queries) |