Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Auto macro question

How can I rename a macro in Excel 2000 to run automatically when the
spreadsheet opens?

Thanks,

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Auto macro question

Mike, you can name it auto_open or put your code in the workbook open event

Sub Auto_Open()

'your code here

End Sub

or in thisworkbook


Private Sub Workbook_Open()

'your code here

End Sub



--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **


"OceansideDJ" wrote in message
...
How can I rename a macro in Excel 2000 to run automatically when the
spreadsheet opens?

Thanks,

Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto macro question

Use the Workbooks_Open event and call you macro from there. This sub should
be put in the ThisWorkbook module (select it from the dropdowns at the top
of the module to insure it is declared properly.

See Chip Pearson's page on Events:

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

--
Regards,
Tom Ogilvy


"OceansideDJ" wrote in message
...
How can I rename a macro in Excel 2000 to run automatically when the
spreadsheet opens?

Thanks,

Mike



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Auto macro question

You need to add this event code plus you macro code to the this Workbook
module of your worksheet.

Private Sub Workbook_Open()

'Your code here

End Sub

"OceansideDJ" wrote:

How can I rename a macro in Excel 2000 to run automatically when the
spreadsheet opens?

Thanks,

Mike

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto macro question

Mike,
In a standard module, try this...

Sub Auto_Open()
....
End Sub

OR

In the "ThisWorkbook" module...

Private Sub Workbook_Open()
....
End Sub

Dale

"OceansideDJ" wrote:

How can I rename a macro in Excel 2000 to run automatically when the
spreadsheet opens?

Thanks,

Mike



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
Auto Calculate Question / HELP! Andy Excel Worksheet Functions 2 January 7th 10 06:21 PM
Auto filter question AN Excel Worksheet Functions 1 June 20th 08 11:28 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
auto filling question vincent135 Excel Discussion (Misc queries) 2 June 13th 06 07:51 PM
auto filter question scott23 Excel Programming 2 January 12th 04 03:40 PM


All times are GMT +1. The time now is 12:55 AM.

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

About Us

"It's about Microsoft Excel"