Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro not working when Sheet protected

You can unprotect your sheet in the code
and protect it again after your code is ready.

But I like this way.

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

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

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




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



"dlindberg" wrote in message ...
hoping you can help. I've created a macro, which works
fine. Than I've protected the sheet. I have unlocked the
cells that are effected by the protection, however when
the macro sorts, I get an error. Any ideas of a work
around.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro not working when Sheet protected

thank you so much for the help.
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
Autofilter not working on protected sheet. parahumanoid[_2_] Excel Discussion (Misc queries) 1 November 1st 09 05:52 PM
Autofilters not working when sheet is protected murkaboris Excel Discussion (Misc queries) 10 August 25th 09 09:11 PM
Macro stops working when sheet is protected RefLib1978 Excel Discussion (Misc queries) 3 May 28th 09 03:57 PM
Filters not working on Protected sheet Krishna Kumar L Excel Discussion (Misc queries) 1 February 9th 09 07:08 AM
Hyperlinks not working after sheet is protected.... TG Excel Discussion (Misc queries) 1 December 30th 08 12:43 AM


All times are GMT +1. The time now is 02:27 PM.

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"