Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make Excel Cell Readonly
Message
De
16/08/2006 07:14:28
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
16/08/2006 06:33:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01145918
Message ID:
01145922
Vues:
25
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform