Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel 2007 and FormatConditions code
Message
De
23/02/2009 15:57:13
 
 
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
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01383370
Message ID:
01383586
Vues:
55
This message has been marked as a message which has helped to the initial question of the thread.
>>Thanks a lot for your response. I put TOTAL in the first column at the very bottom. The mentioned code works fine in Excel 2003, >>but does nothing in Excel 2007.

>>How exactly do you suggest me to adjust it?

Naomi,
I've not used xlLastCell before, but as far as I can see in 2007 at least it is only return a selection to the last cell that has a value assigned, therefore in an empty column it only selects and assigns the FormatCondition to cell A1.

If you change your selection line as below it seems to work fine.
*!*loExcel.RANGE([A1], loExcel.SELECTION.SpecialCells(xlLastCell)).SELECT
loExcel.Columns("A:A").SELECT
loExcel.SELECTION.FormatConditions.DELETE
loExcel.SELECTION.FormatConditions.ADD(xlExpression,, '=UPPER(Left($A1,5))="TOTAL"')

WITH loExcel.SELECTION.FormatConditions(1)
.FONT.Bold = .T.
 .Interior.ColorIndex = 4
ENDWITH
Regards

Gary.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform