ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looking for a way to run a macro when the workbook is opened (https://www.excelbanter.com/excel-programming/311418-looking-way-run-macro-when-workbook-opened.html)

Bob Reynolds[_3_]

Looking for a way to run a macro when the workbook is opened
 
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



JulieD

Looking for a way to run a macro when the workbook is opened
 
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

"Bob Reynolds" wrote in message
...
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





Bob Reynolds[_3_]

Looking for a way to run a macro when the workbook is opened
 
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

"JulieD" wrote in message
...
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

"Bob Reynolds" wrote in message
...
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







JulieD

Looking for a way to run a macro when the workbook is opened
 
you're welcome

"Bob Reynolds" wrote in message
...
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

"JulieD" wrote in message
...
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

"Bob Reynolds" wrote in message
...
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










All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com