Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Freeze top row in all MS-Excel worksheets
Message
De
07/01/2014 00:47:19
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
06/01/2014 20:50:22
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01591436
Message ID:
01591442
Vues:
50
J'aime (1)
>>Hi,
>>
>>I'm trying to freeze the top row in each worksheet in my workbook.
>>
>>I'm not quite clear on the use of "Window" in MS-Excel....every other command seems to work on a worksheet or workbook as a whole.
>>
>>I have tried setting the value to freeze the top row in a worksheet, etc. but the following is the only thing that i have gotten to work when m.tiSheet = 1; the workbook has 10 sheets in it.
>>
>>
>>WITH m.toWorkbook.WINDOWS[m.tiSheet]
>>	.SplitColumn = 0
>>	.SplitRow = 1
>>	.FreezePanes = .T.
>>ENDWITH
>>
>>
>>Can anyone help w/the correct syntax to freeze the top row in EVERY worksheet in the workbook?
>>
>>TIA, appreciate it!
>>
>>J
>
>
>Jill, you can always determine the exact syntax of any sequence of commands in Excel by going in and beginning to record a macro, perform the operation, stop recording the macro, and then go in and view the macro source code. If there are any constants which show up as "xlValue" you can press F8 and then hover over them to obtain their actual values. Typically you can copy-and-paste into Visual FoxPro from there and with minor edits have it working.

Thanks Rick...that's EXACTLY what i did to get the syntax i used above. But I was getting messed up with the "Windows" reference (as opposed to workbooks and worksheets, etc.).

Just tried the following and it worked:
toWorkbook.Sheets[m.tiSheet].Select

WITH oAppInfo.oExcel.ActiveWindow
	.SplitColumn = 0
	.SplitRow = 1
	.FreezePanes = .T.
ENDWITH
Thanks for responding. J
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform