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

I would like to protect 4 cells in my document so changes cannot be made to
them. The rest of the cells I would like to leave unprotected. I took the
lock off the rest of the cells and I protected my worksheet. It worked fine
but the only problem is I can't run my macros. Is there a way I can run my
macros and protect my cells. Any help is appreciated. Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protecting Cells with macros

Hi Peter,

One way is to amend your macros to initially unprotect the sheet and finally
reprotect the sheet.

An alternative approach would be to set Protect's UserInterfaceOnly argument
to True. This setting is not persistent and so needs to be reset each time
the workbook is opened.

---
Regards,
Norman



"Peter McCaul" wrote in message
...
I would like to protect 4 cells in my document so changes cannot be made

to
them. The rest of the cells I would like to leave unprotected. I took

the
lock off the rest of the cells and I protected my worksheet. It worked

fine
but the only problem is I can't run my macros. Is there a way I can run my
macros and protect my cells. Any help is appreciated. Thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Protecting Cells with macros

have you code unprotect the worksheet, run, reprotect the worksheet

Use the UserInterfaceOnly argument set to true in a protect statement.

See help for the protect method for details.

--
Regards,
Tom Ogilvy


"Peter McCaul" wrote in message
...
I would like to protect 4 cells in my document so changes cannot be made

to
them. The rest of the cells I would like to leave unprotected. I took

the
lock off the rest of the cells and I protected my worksheet. It worked

fine
but the only problem is I can't run my macros. Is there a way I can run my
macros and protect my cells. Any help is appreciated. Thanks.




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 / workbook with macros WLMPilot Excel Discussion (Misc queries) 2 May 30th 06 04:35 PM
Protecting My Macros Greegan Excel Worksheet Functions 1 December 4th 04 10:58 PM
Protecting Macros Anthony[_9_] Excel Programming 1 July 31st 04 10:58 AM
Protecting Macros -is it possible AlwaysAsking Excel Programming 3 June 25th 04 10:55 PM
protecting cells with macros maly_pajak Excel Programming 2 November 27th 03 10:01 AM


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