Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hidden columns in Excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01146393
Message ID:
01146516
Vues:
13
>Here is what I put in my routine:
>
>
>	if m.tlLockHeaderRow && we need to prevent headers from modifying
>			** Code from Borislav Borissov
>			loSheet.range(m.lcRange).select
>			loExcel.Selection.Locked = .t.
>*			loExcel.ActiveWorkbook.ActiveSheet.Protect(,.t.,,.t.)
>    endif 	
>
>With protect none of the cells could be edited. Without protect all cells including headers can be edited. Need more help to get it right.
>
>Thanks again.
if m.tlLockHeaderRow && we need to prevent headers from modifying
   ** Code from Borislav Borissov  :-)))) I like this comment
   loSheet.range(m.lcRange).select
   loExcel.Selection.Locked = .f. && First we need to UNLOCK all cells
   oExcel.Rows("1:1").Select      && Select First row of the sheet, If you want you could select only used cells
   loExcel.Selection.Locked = .t. && Lock Cells in first row
   loExcel.ActiveWorkbook.ActiveSheet.Protect(,.t.,,.t.) && Protect the sheet so Locked cells can't be edited
endif 	
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform