Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Read Only Problem

Hello

I want to make parts of a worksheet read only. However, when I do this it
interferes with my code running corretly. In particular, I get an error each
time I try to assign...

Selection.Interior.ColorIndex = 50

Is this a bug in Excel or can I get around this?

I have 'unlocked' the cells on my worksheet that I want to be able to be
manipulated by a user, and left the rest as locked so that they cannot be
maipulated.

I hear that you can write code along the lines of...

Application.Protect UserInterfaceOnly = False

....to protect wroksheets.

May this approhch be of more assitance?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Read Only Problem

Yes. UserInterfaceOnly:=True

as an argument to the protect method will allow your code to operate on the
worksheet while it is protected.

an alternative is to

Activesheet.Unprotect ' arguments

' make your changes
Activesheet.Protect ' arguments

--
Regards,
Tom Ogilvy


"Alex" wrote in message
...
Hello

I want to make parts of a worksheet read only. However, when I do this it
interferes with my code running corretly. In particular, I get an error

each
time I try to assign...

Selection.Interior.ColorIndex = 50

Is this a bug in Excel or can I get around this?

I have 'unlocked' the cells on my worksheet that I want to be able to be
manipulated by a user, and left the rest as locked so that they cannot be
maipulated.

I hear that you can write code along the lines of...

Application.Protect UserInterfaceOnly = False

...to protect wroksheets.

May this approhch be of more assitance?



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
counter problem(you really want to read this) Nicky Whispers New Users to Excel 0 August 29th 07 02:44 AM
counter problem(you really want to read this) Nicky Whispers New Users to Excel 0 August 29th 07 02:40 AM
Open as read only Problem Dave Excel Worksheet Functions 0 July 26th 05 01:38 PM
Read-only problem NB Excel Discussion (Misc queries) 1 June 24th 05 12:17 AM
Addin in read-only mode problem Stuart[_5_] Excel Programming 1 August 20th 03 02:41 AM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"