Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run a macro at startup

I have a macro that I need to run in an Excel file when
the worksheet opens.

Any ideas?

Robyn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run a macro at startup

Robyn,

You can use the Workbook_Open event under ThisWorkbook

eg.
Private Sub Workbook_Open()
MsgBox "Hello!"
End Sub

Or you can include a Sub in one of the modules called: Auto_Open
(I think this is an older way of doing it - you should use Workbook_Open)

eg.
Sub Auto_Open()
MsgBox "Hello!"
End Sub

Rob


"Robyn Thomas" wrote in message
...
I have a macro that I need to run in an Excel file when
the worksheet opens.

Any ideas?

Robyn



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 Startup for a Macro gspirrison Excel Discussion (Misc queries) 5 January 5th 10 06:07 PM
Startup Macro Max Excel Discussion (Misc queries) 6 May 24th 07 01:20 PM
starting a macro at startup chip_pyp Excel Discussion (Misc queries) 1 March 22nd 06 06:59 PM
Startup macro Zeno Excel Discussion (Misc queries) 1 June 29th 05 01:06 PM
Automatic startup of an excel macro Quist Excel Programming 3 October 3rd 03 04:31 PM


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