Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default protecting cells with macros


does anyone know how to protect (unprotected) cells with macros whil
the sheet itself is protected? i'm running into run-time error
(Unable to set the Locked propertyof the Range class '1004').

thanks!

maly_paja

-----------------------------------------------
~~ 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: 8
Default protecting cells with macros

Maly

I'm not sure what you want but normally the cells to be
operated on are first unlocked on the Format Menu before
the sheet is protected.

If you need to unprotect the sheet during a macro you can
use a toggle in the code.

Protect = not proctect

Record the Protecting and Unprotecting the macro then
revise the code

regards
Peter Atherton

-----Original Message-----

does anyone know how to protect (unprotected) cells with

macros while
the sheet itself is protected? i'm running into run-time

errors
(Unable to set the Locked propertyof the Range

class '1004').

thanks!

maly_pajak


------------------------------------------------
~~ 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: 62
Default protecting cells with macros

Hello Maly,

You need to unprotect your sheet first.

Activesheet.Unprotect "PASSWORD"
'your code here
Activesheet.Protect "PASSWORD"

Replace "PASSWORD" with your password if there is any otherwise don't
include that word.

Regards,

Jon-jon

"maly_pajak" wrote in message
...

does anyone know how to protect (unprotected) cells with macros while
the sheet itself is protected? i'm running into run-time errors
(Unable to set the Locked propertyof the Range class '1004').

thanks!

maly_pajak


------------------------------------------------
~~ 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
Protecting a worksheet which has button controlled macros Clinton Walker Excel Discussion (Misc queries) 0 September 8th 06 03:21 AM
Protecting a worksheet / workbook with macros WLMPilot Excel Discussion (Misc queries) 2 May 30th 06 04:35 PM
protecting macros for a protected sheet Jon Excel Discussion (Misc queries) 3 March 29th 06 03:32 PM
Protecting My Macros Greegan Excel Worksheet Functions 1 December 4th 04 10:58 PM
protecting excel macros from being changed/ seen by user jon tebbens Excel Programming 1 September 17th 03 07:22 PM


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