ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automate macro (https://www.excelbanter.com/excel-programming/271830-automate-macro.html)

Marc[_8_]

Automate macro
 
Hi,
Is it possible to have a macro run automatically when a
particular spreadsheet opens?
I'm in Excel 2000 and Windows 98.

Thanks,

Marc

John Wilson

Automate macro
 
Marc,

Two ways.....

1st is to name your macro Auto_Open

Sub Auto_Open()
'your code here or your sub name here
End Sub

or place your code (or a call to your sub) in the Workbook_Open Event
Double click on the "ThisWorkbook" in the "Projects" window and copy
and paste the following:

Private Sub Workbook_Open()
'your code here or your sub name here
End Sub

John


Marc wrote:

Hi,
Is it possible to have a macro run automatically when a
particular spreadsheet opens?
I'm in Excel 2000 and Windows 98.

Thanks,

Marc



Marc[_8_]

Automate macro
 
Thanks John

That worked! And thanks for such a quick response.

Marc

-----Original Message-----
Marc,

Two ways.....

1st is to name your macro Auto_Open

Sub Auto_Open()
'your code here or your sub name here
End Sub

or place your code (or a call to your sub) in the

Workbook_Open Event
Double click on the "ThisWorkbook" in the "Projects"

window and copy
and paste the following:

Private Sub Workbook_Open()
'your code here or your sub name here
End Sub

John


Marc wrote:

Hi,
Is it possible to have a macro run automatically when a
particular spreadsheet opens?
I'm in Excel 2000 and Windows 98.

Thanks,

Marc


.



All times are GMT +1. The time now is 09:48 PM.

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