Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Running of a Macro when Workbook is opened



Hi there, I want a Macro to run automatically when a workbook is opened
- is it possible..?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Running of a Macro when Workbook is opened

Sure is. One of two ways

Add an event procedure called Workbook_Open to the This workbook code module

Private Sub Workbook_Open()
... do your stuff
End Sub

or simply add a procedure called Auto_Open in a general code module

Sub Auto_Open()
... do your stuff
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darin Kramer" wrote in message
...


Hi there, I want a Macro to run automatically when a workbook is opened
- is it possible..?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Running of a Macro when Workbook is opened

This can be done with the Workbook_Open event.

See Chip Pearson's page that explains workbook related events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"Darin Kramer" wrote in message
...


Hi there, I want a Macro to run automatically when a workbook is opened
- is it possible..?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Add-in to run macro when ANY workbook is opened? jruppert Excel Programming 2 November 5th 04 02:28 PM
Looking for a way to run a macro when the workbook is opened Bob Reynolds[_3_] Excel Programming 3 September 25th 04 02:58 PM
Running a macro when a Wb is opened Marco Rodas Excel Programming 2 February 12th 04 03:44 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 06:52 PM.

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"