Runnig a macro when excel opens

  • Thread starter Thread starter vman
  • Start date Start date
V

vman

Does anyone know how to run a macro automatically when excel opens?

Surely this should be simple (it is simple to start a query in access
when you open it)

I am a beginner using VB code in excel.

Hope someone can help.

Thanks

Vman
 
to run a macro upon opening a workbook you need to create a macro in th
'ThisWorkbook' object (see top left of VB Editor screen and doubl
click 'ThisWorkbook').

e.g. to show a userform upon opening I have used the following:

Private Sub Workbook_Open()
Quote_Details.Show
End Sub

Hope that help
 
If you want a macro to run when Excel opens, no matter what workbook you are
opening, I believe you'll need to put the macro in the PERSONAL.XLS
workbook, which opens and is hidden every time Excel opens. To create
PERSONAL.XLS, record a macro and choose to create it in PERSONAL.XLS. If
the workbook doesn't exist Excel will create it that time and it will then
always open whenever Excel opens. Put the macro in the Workbook_Open event
handler.

-gk-
 
I think that I have done exactly as described, in an empty worksheet,
assuming that the instructions were exact and complete.
After saving the workbook and reopening it I get the following error:-
Run-time error '424'
Object required

What am I doing wrong?
Do the instructions omit some detail that I am assumed to know?
What should I expect to see?

Thanks for any help
Brian Tozer
 
Back
Top