View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
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