Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Run macro upon opening document

Hello - I want this simple macro to automatically run everytime my document
is opened, but I'm not sure how to do that. Can you help? Thanks.


Activesheet.Protect
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Run macro upon opening document

Create a new macro in a general module. Name it auto_open:

Option Explicit
Sub Auto_Open()
activesheet.protect
End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Munchkin wrote:

Hello - I want this simple macro to automatically run everytime my document
is opened, but I'm not sure how to do that. Can you help? Thanks.

Activesheet.Protect


--

Dave Peterson
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
Run macro automatically upon opening or closing document Munchkin Excel Programming 2 June 8th 09 03:27 PM
Opening a Word Document using an Excel (2000) Macro? ekreider Excel Discussion (Misc queries) 4 January 5th 08 04:41 AM
Opening an already existant Word document with an Excel Macro Tan Excel Programming 1 March 5th 07 07:39 PM
Start Excel Macro upon opening of document Brett Excel Programming 4 June 13th 05 06:27 PM
Two copies of same document appear when opening a document Kathy at the Fort Excel Discussion (Misc queries) 1 December 15th 04 05:46 PM


All times are GMT +1. The time now is 09:58 PM.

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"