Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Using a Macro with the sheet protected.

How do I use a macro and have the sheet protceted at the same time.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using a Macro with the sheet protected.

Protect your worksheets with code with userfaceonly like this
Place this in the Thisworkbook module.

The macro's will be working now
It will only protect the userfaceonly

Right click on the Excel icon next to File in the menubar
And choose View code

You are now in the Thisworkbook module
Paste the Event in this place
Alt-Q to go back to Excel

Private Sub Workbook_Open()
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Protect "ABCD", , , userinterfaceonly:=True
Next sh
Application.ScreenUpdating = True
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Jason Watts" wrote in message ...
How do I use a macro and have the sheet protceted at the same time.



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
Macro & Protected sheet Lise Excel Discussion (Misc queries) 2 April 11th 10 10:36 PM
how to enable a macro in protected sheet Steve Eastham Excel Discussion (Misc queries) 2 May 4th 07 03:34 PM
macro on protected sheet-error michaelberrier Excel Discussion (Misc queries) 6 June 11th 06 06:31 PM
use macro button to run macro in protected sheet earl Excel Discussion (Misc queries) 3 February 26th 06 10:21 PM
Macro Errs when sheet is protected Skankles Excel Worksheet Functions 1 February 10th 05 06:44 PM


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