Simple yet.....

G

Guest

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
 
E

Ed

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
 
A

Ashela

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




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top