ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to run a macro as soon a a workbook (.xls) is opened? (https://www.excelbanter.com/excel-worksheet-functions/60697-how-run-macro-soon-workbook-xls-opened.html)

Sangamesh Acharya

How to run a macro as soon a a workbook (.xls) is opened?
 
How to run a macro as soon a a workbook (.xls) is opened?

Rowan Drummond

How to run a macro as soon a a workbook (.xls) is opened?
 
Use the Workbook_Open event. In Excel right click the Excel Icon just
left of the File Menu. Select View Code. Paste the following and change
as required:

Private Sub Workbook_Open()
MsgBox "Hello World!"
End Sub

Hope this helps
Rowan

Sangamesh Acharya wrote:
How to run a macro as soon a a workbook (.xls) is opened?



All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com