Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Excel Cell Readonly
Message
From
16/08/2006 07:14:28
 
 
To
16/08/2006 06:33:41
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01145918
Message ID:
01145922
Views:
26
>Dear Experts
>
>How to make some Excel Cell Readonly through Excel functions?
>Suppose I want to make Cell=a15 readonly.
>
>Please help

Tariq,

First, set the locked property of all the cells you want to be read/write to False. Then set protection on for the worksheet. For example, if you have an object reference to the sheet, oSheet, you could do something like this,
WITH oSheet
   .Range("B1:H1000").Locked = False
   .Range("A2:A1000").Locked = False
   .Protect(,,.T.)
ENDWITH
and cell A1 would be read only but all other cells in the block A1 to H1000 would be read/write.

Regards,
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform