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 certain cells

I am writing a program where i need to clear, and color certain cells,
but want the user to have read only access on this particular page.
When i all the cells i want locked and I protect the sheet, my program
keeps getting stopped on the lines of code that clears, and colors
these cells. How would i keep these cells protected but still be able
to clear and color them.

  #2   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default Protecting certain cells

Hi William,

You can just unprotect and protect the sheet within your macro, e.g.:

Sub Test()
Pass="YourPassword"
Worksheets("Sheet1").Unprotect Pass
'your code here
Worksheets("Sheet1").Protect Pass
End Sub

Regards,
KL


"William Spence" wrote in message
ups.com...
I am writing a program where i need to clear, and color certain cells,
but want the user to have read only access on this particular page.
When i all the cells i want locked and I protect the sheet, my program
keeps getting stopped on the lines of code that clears, and colors
these cells. How would i keep these cells protected but still be able
to clear and color them.



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 CELLS LOCKING CELLS Excel Discussion (Misc queries) 2 April 20th 10 06:42 PM
Protecting cells Tommy Boy Excel Discussion (Misc queries) 3 October 29th 07 03:15 PM
protecting certain cells [email protected] Excel Discussion (Misc queries) 2 July 2nd 06 06:26 PM
Protecting Cells Pedro Excel Discussion (Misc queries) 2 June 8th 06 06:25 PM
Protecting Cells Katie Excel Worksheet Functions 0 September 16th 05 03:36 PM


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