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:
01146463
Views:
11
This message has been marked as the solution to the initial question of the thread.
>>INKEY() is just for my test, so I can switch between VFP and Excel to watch what happens) you must remove it in production. FreezePanes freezes all rows above selected and all columns in left of selection (selection is not included).
>
>Does it prevent it from modifying? I probably used the wrong word. I need the column headers to be exactly the same. In other words, they should not be able to change them. How can I accomplish that?

O I see, you want to Lock the Cells, not to be showed if the user scrolls down.
To protect first row:
LOCAL oExcel AS Excel.Application
oExcel = CREATEOBJECT([Excel.Application])
oExcel.Workbooks.Add()
oExcel.Cells.Select
oExcel.Selection.Locked = .f.
oExcel.Rows("1:1").Select
oExcel.Selection.Locked = .t.
oExcel.ActiveWorkbook.ActiveSheet.Protect(,.t.,,.t.)

oExcel.Visible = .t.
INKEY(0)
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