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

I would like to know how to have an Excel worksheet automatically execute a
macro on startup?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Excel worksheet startup

Joseph,

The easy way is to use the Auto_Open macro.

Sub Auto_Open()
' your macro here
End Sub

Another way would be to use the Workbook_Open Event handler.

John


"Joseph" wrote in message
...
I would like to know how to have an Excel worksheet automatically execute

a
macro on startup?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Excel worksheet startup

You can put your code in a general module and name that macro auto_open. (You
could also put the code in the workbook_open event under the ThisWorkbook
module.)

Then when you open your workbook (with macros enabled), your code will run.


Joseph wrote:

I would like to know how to have an Excel worksheet automatically execute a
macro on startup?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel worksheet startup

Thanks guys!


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
Intermittent startup error -- inverted worksheet window in Excel 2 AceWriter01 Excel Discussion (Misc queries) 0 September 14th 07 04:42 PM
Blank worksheet at startup Art@ISCO Setting up and Configuration of Excel 0 July 17th 07 01:58 PM
Startup on a specific worksheet Jens Palacios Neffke[_2_] Excel Discussion (Misc queries) 4 April 12th 07 12:16 AM
how do i get excel to stop opening a blank worksheet @ startup? lady_gemini1971 Excel Discussion (Misc queries) 5 October 18th 06 11:38 PM
How do I set a worksheet to be the default at startup? Dan Dobill Setting up and Configuration of Excel 3 December 22nd 05 06:12 PM


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