ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Macros When Spreadsheet is Open (https://www.excelbanter.com/excel-programming/399446-run-macros-when-spreadsheet-open.html)

Joe K.

Run Macros When Spreadsheet is Open
 

I would like to run macros date_check and date_close when the spreadsheet is
first open.

Please help me complete this task.

Thanks,

JRForm

Run Macros When Spreadsheet is Open
 
Joe K

Place this code in the ThisWorkbook code module.

Sub Auto_Open()

date_check
date_Close

End Sub


"Joe K." wrote:


I would like to run macros date_check and date_close when the spreadsheet is
first open.

Please help me complete this task.

Thanks,


Leith Ross[_2_]

Run Macros When Spreadsheet is Open
 
On Oct 16, 7:22 pm, Joe K. <Joe wrote:
I would like to run macros date_check and date_close when the spreadsheet is
first open.

Please help me complete this task.

Thanks,


Hello Joe,

Place your macros in either the Workbook_Open event procedure, or the
Auto_Open procedure. If you need to activate a given sheet as well for
your macro to run then include add the appropriate Sheet names to the
procedures as well.

Sub Auto_Open()
'Sheets("Sheet1").Activate
date_check
date_Close
End Sub

Sub Wokrbook_Open()
'Sheets("Sheet1").Activate
date_check
date_close
End Sub

Sincerely,
Leith Ross



All times are GMT +1. The time now is 02:13 PM.

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