Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatic Macros

Hey! I need some help form the pros, I need to create a
macro that runs automatically when the workbook in excel
opens, How do I do that? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Automatic Macros

Use the Workbook_Open event of your workbook.

ex:
In your workbook VBA module

Private Sub Workbook_Open()

msgbox "Workbook Open!!!!!"

end sub



-----Original Message-----
Hey! I need some help form the pros, I need to create a
macro that runs automatically when the workbook in excel
opens, How do I do that? Thanks
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Automatic Macros

Diego,

You can name the macro Auto_Open. Alternatively, you can use the Open event
of the workbook. In the ThisWorkbook code module, use

Private Sub Workbook_Open()
' your code here
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Diego" wrote in message
...
Hey! I need some help form the pros, I need to create a
macro that runs automatically when the workbook in excel
opens, How do I do that? Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatic Macros

Thanks!!!! I tried naming it auto_open it worked. By the
way...How do I get to the this workbook code module? I
couldn't do it. Regards.

-----Original Message-----
Diego,

You can name the macro Auto_Open. Alternatively, you can

use the Open event
of the workbook. In the ThisWorkbook code module, use

Private Sub Workbook_Open()
' your code here
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Diego" wrote in

message
...
Hey! I need some help form the pros, I need to create a
macro that runs automatically when the workbook in excel
opens, How do I do that? Thanks



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Automatic Macros

Diego,

You get to the ThisWorkbook module by first displaying the Project Explorer
window (View menu, Project Explorer, or just CTRL+R). Find your project in
the TreeView on the left side of the screen, and expand the folder. You'll
see a folder called "Microsoft Excel Objects". Expand that, and double click
the ThisWorkbook icon.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Diego" wrote in message
...
Thanks!!!! I tried naming it auto_open it worked. By the
way...How do I get to the this workbook code module? I
couldn't do it. Regards.

-----Original Message-----
Diego,

You can name the macro Auto_Open. Alternatively, you can

use the Open event
of the workbook. In the ThisWorkbook code module, use

Private Sub Workbook_Open()
' your code here
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Diego" wrote in

message
...
Hey! I need some help form the pros, I need to create a
macro that runs automatically when the workbook in excel
opens, How do I do that? Thanks



.



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
Automatic Macros David Fredrickson Excel Worksheet Functions 2 April 20th 09 05:50 PM
How to enable macros and automatic calculation on Excel Viewer? David Excel Worksheet Functions 2 April 5th 07 08:53 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM
Automatic Macros Invocation pthien Excel Programming 5 August 6th 03 05:52 PM
Excel 2002 Automatic Macros CM[_4_] Excel Programming 1 July 17th 03 12:57 AM


All times are GMT +1. The time now is 10:49 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"