Looking for a way to run a macro when the workbook is opened

  • Thread starter Thread starter Bob Reynolds
  • Start date Start date
B

Bob Reynolds

Hello,
I am trying to put together a macro that when I open the workbook, will
automatically start and select a worksheet within the workbook, and then
select a specific cell "A2" within that worksheet and then run my specific
macro.

Any help would be appreciated
Thanks
BOB REYNOLDS
 
Hi Bob

to run a macro when the workbook opens in the VBE Window - Project
Explorer - double click on "ThisWorkbook" - in the code area choose from the
left hand side drop down, Workbook and the sub Workbook_Open should be
created for you. Place your code inside here

e.g.

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("A2").Select
Call mymacro
End Sub

Hope this helps
Cheers
JulieD
 
Julie, Thanks so much and thanks to all who take their time to help us out
on these boards, your time is very much appreciated.
Bob Reynolds
 
you're welcome

Bob Reynolds said:
Julie, Thanks so much and thanks to all who take their time to help us out
on these boards, your time is very much appreciated.
Bob Reynolds
 

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

Back
Top