Run a macro when I open a workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I run a macro automatically when I open a workbook? Also, how can
linked data automatically be refreshed wihtout clicking any buttons? I
basically want to use the windows task scheduler to open a workbook with
linked information at a specific time each day and then run a macro. I don't
know much about VBA, so please keep the response simple.
 
Private Sub Workbook_Open()
Call myMacro
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top