Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
How to run a macro as soon a a workbook (.xls) is opened? Sangamesh Acharya Excel Worksheet Functions 1 December 15th 05 11:15 PM
Can macro/userform run depending on HOW workbook is opened? grasping@straws Excel Discussion (Misc queries) 1 December 28th 04 03:19 PM
Run a macro when a workbook is opened Mervyn Thomas[_3_] Excel Programming 2 July 25th 03 11:40 AM
Run a macro when a workbook is opened Mervyn Thomas[_3_] Excel Programming 0 July 25th 03 11:18 AM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"