how to auto run the macro

M

macro prob

hi all
how to run the macro automatically when i start the worksheet instead of via tools/macro/macros to run
pls help
 
G

Gord Dibben

With Excel and workbook Window maximized, right-click on the Excel logo just
left of "File" on menu bar and select "View Code".

This opens the Thisworkbook module of your workbook.

Click on the left-side dialog box(should say "General") change to "Workbook"
and select.

You will get a couple of lines of code entered automatically.

Private Sub Workbook_Open()

End Sub

Between the two lines enter your code or a call to a macro you want to run.

Gord Dibben Excel MVP
 

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