How can I automatically run a macro when a workbook is opened? Excel 97. Thanks.
H hmmm... Aug 7, 2003 #1 How can I automatically run a macro when a workbook is opened? Excel 97. Thanks.
C Chip Pearson Aug 7, 2003 #2 Name the macro Autpen in a standard code module, or use the Workbook_Open event procedure in the ThisWorkbook code module. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
Name the macro Autpen in a standard code module, or use the Workbook_Open event procedure in the ThisWorkbook code module. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
G Gord Dibben Aug 7, 2003 #3 Yes Right-click on the Excel Icon at top left of screen. Select View Code. In top left dialogue box you will see "General". Click on drop-down and change to "Workbook". These two lines will appear. Private Sub Workbook_Open() End Sub Place your macro name or code between like so........ Private Sub Workbook_Open() ''macro name or code goes here End Sub Gord Dibben Excel MVP - XL97 SR2 & XL2002
Yes Right-click on the Excel Icon at top left of screen. Select View Code. In top left dialogue box you will see "General". Click on drop-down and change to "Workbook". These two lines will appear. Private Sub Workbook_Open() End Sub Place your macro name or code between like so........ Private Sub Workbook_Open() ''macro name or code goes here End Sub Gord Dibben Excel MVP - XL97 SR2 & XL2002
H hmmm... Aug 7, 2003 #4 Thank you. -----Original Message----- Yes Right-click on the Excel Icon at top left of screen. Select View Code. In top left dialogue box you will see "General". Click on drop-down and change to "Workbook". These two lines will appear. Private Sub Workbook_Open() End Sub Place your macro name or code between like so........ Private Sub Workbook_Open() ''macro name or code goes here End Sub Gord Dibben Excel MVP - XL97 SR2 & XL2002 Click to expand...
Thank you. -----Original Message----- Yes Right-click on the Excel Icon at top left of screen. Select View Code. In top left dialogue box you will see "General". Click on drop-down and change to "Workbook". These two lines will appear. Private Sub Workbook_Open() End Sub Place your macro name or code between like so........ Private Sub Workbook_Open() ''macro name or code goes here End Sub Gord Dibben Excel MVP - XL97 SR2 & XL2002 Click to expand...
H hmmm... Aug 7, 2003 #5 Thank you. -----Original Message----- Name the macro Autpen in a standard code module, or use the Workbook_Open event procedure in the ThisWorkbook code module. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed) . Click to expand...
Thank you. -----Original Message----- Name the macro Autpen in a standard code module, or use the Workbook_Open event procedure in the ThisWorkbook code module. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed) . Click to expand...