macros

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Macros

Macros

resolvedResolved · Low Priority · Version 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:

Validating text entries

1. Select the range of cells.
2. From the Data menu, select Validation.
3. Select the Settings tab.
4. From the Allow dropdown list, select Custom.
5. In the Formula box, enter the following formula:

=IsText (A1)

where A1 is the first cell in the range.
6. Click OK.

View all Excel hints and tips


Server loaded in 0.05 secs.