Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hidden columns in Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01146393
Message ID:
01146516
Views:
14
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform