Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

macros

ResolvedVersion 2003

Linda has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Macros

how do i get a Macro to open automatically on opening of the worksheet?

RE: Macros

Hi Linda

To get a macro to open automatically when the workbook opens you need to create an Event procedure. To do this:

1. In the Visual Basic Editor double click on "ThisWorkbook" in the Project section.

The "ThisWorkbook" code window appears

2. In the code window drop down the left combo box and select "Workbook". The computer automatically creates the following Event procedure:

Private Sub Workbook_Open()

End Sub

Write the code that you want to run when the Worbook opens inside the above event. The code will run every time the workbook opens.

Hope this helps

Carlos

Mon 29 Jun 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Quickly Adding New Worksheets

Want to place a new Excel worksheet before current worksheet. Use keystroke SHIFT+F11

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.