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

vba

ResolvedVersion Standard

Edward has attended:
Excel VBA Intro Intermediate course
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course

VBA

How do you get a macro to function automatically on opening of a workbook?

RE: VBA

Hi Edward

To run a macro when the workbook opens you need to do the following:

1. In the VB Editor double click "This Workbook" in the project window

2. The code window for "This Workbook" appears

3. In the drop down area at the top select Workbook. The Open Event Procedure appears.

4. Call the macro as shown below:

Private Sub Workbook_Open()

Call MyMacro

End Sub


Hope this helps

Carlos

Excel tip:

Transpose text

You can transpose any range of cells, turning the columns into rows and the rows into columns. Just follow these steps:

Select the range.

Click the Copy button on the Standard toolbar to copy it to the Clipboard.

Select a cell outside of the range you copied.

Select Paste Special from the Edit menu.

In the Paste Special dialog box, click Transpose, then OK.

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.1 secs.