![]() |
Autorun macro on opening spreadsheet
I just wanted to know how to setup a macro to run as soon as the spreadsheet is open. Can anyone help me with this? Many thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Autorun macro on opening spreadsheet
go into the VBE (alt+F11) and in the project explorer on the left, select
ThisWorkbook entry under you workbook/project. Double click on it to get the ThisWorkbook Module displayed. In this module at the top, in the left dropdown, select Workbook and in the right dropdown, select Open. This will put in the declaration for the workbook_Open event which fires when the workbook is opened Private Sub Workbook_Open() End Sub put your code or a call to your code in the above declaration. -- Regards, Tom Ogilvy "simonjackson79" wrote in message ... I just wanted to know how to setup a macro to run as soon as the spreadsheet is open. Can anyone help me with this? Many thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Autorun macro on opening spreadsheet
Refer to the macro you want to run in the Workbook_Open section of
ThisWorkbook in Microsoft Excel Objects |
Autorun macro on opening spreadsheet
Many thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 11:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com