Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autorun macro on opening spreadsheet


I just wanted to know how to setup a macro to run as soon as the
spreadsheet is open. Can anyone help me with this?

Many thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Autorun macro on opening spreadsheet

go into the VBE (alt+F11) and in the project explorer on the left, select
ThisWorkbook entry under you workbook/project. Double click on it to get
the ThisWorkbook Module displayed. In this module at the top, in the left
dropdown, select Workbook and in the right dropdown, select Open. This will
put in the declaration for the workbook_Open event which fires when the
workbook is opened

Private Sub Workbook_Open()

End Sub

put your code or a call to your code in the above declaration.

--
Regards,
Tom Ogilvy

"simonjackson79" wrote in
message ...

I just wanted to know how to setup a macro to run as soon as the
spreadsheet is open. Can anyone help me with this?

Many thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autorun macro on opening spreadsheet

Refer to the macro you want to run in the Workbook_Open section of
ThisWorkbook in Microsoft Excel Objects
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autorun macro on opening spreadsheet


Many thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

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
AutoRun Macro chrisnsmith Excel Worksheet Functions 5 February 4th 09 07:25 PM
autorun a macro [email protected] New Users to Excel 2 January 24th 08 05:41 PM
Autorun Macro rexmann Excel Discussion (Misc queries) 2 August 2nd 06 02:03 PM
Autorun macro Kelly Excel Worksheet Functions 1 January 18th 06 04:03 PM
autorun macro hke[_3_] Excel Programming 6 October 16th 03 01:18 PM


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