Simple yet.....
I am fairly new to VBA, and I have written a scheduling
calendar Sub routine that is working fairly well - What I want to code is this: When a user Opens the workbook, the "calendar" sheet is the active sheet and the sub "CalendarMaker" runs. I only want this to run when the user Opens the workbook. this is probably fairly easy.... just can't get what I am doing to work |
Simple yet.....
With your Calendar workbook open, hit ALT+F11. In the "tree" pane for your
workbook, double-click ThisWorkbook. Above the empty page are two blocks with down arrows. Use the left one the change 'General' to Workbook - Private Sub Workbook_Open() should appear in the window, with End Sub below it. In between those two lines, put Sheets("Calendar").Activate CalendarMaker Make sure spelling (including capitals and spaces) are exact. That should (I think!) work. Ed wrote in message ... I am fairly new to VBA, and I have written a scheduling calendar Sub routine that is working fairly well - What I want to code is this: When a user Opens the workbook, the "calendar" sheet is the active sheet and the sub "CalendarMaker" runs. I only want this to run when the user Opens the workbook. this is probably fairly easy.... just can't get what I am doing to work |
Simple yet.....
Worked beautifully - thanks very much!!!!
-----Original Message----- With your Calendar workbook open, hit ALT+F11. In the "tree" pane for your workbook, double-click ThisWorkbook. Above the empty page are two blocks with down arrows. Use the left one the change 'General' to Workbook - Private Sub Workbook_Open() should appear in the window, with End Sub below it. In between those two lines, put Sheets("Calendar").Activate CalendarMaker Make sure spelling (including capitals and spaces) are exact. That should (I think!) work. Ed wrote in message ... I am fairly new to VBA, and I have written a scheduling calendar Sub routine that is working fairly well - What I want to code is this: When a user Opens the workbook, the "calendar" sheet is the active sheet and the sub "CalendarMaker" runs. I only want this to run when the user Opens the workbook. this is probably fairly easy.... just can't get what I am doing to work . |
All times are GMT +1. The time now is 06:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com