Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation - ConditionalFormat
Message
 
À
17/02/2004 19:54:50
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00878157
Message ID:
00879993
Vues:
17
What Excel version do you have?
Are you sure that Add method accepts xlformula for Type?

For instance, in Excel97 only xlCellValue or xlExpression accepted.


>Can anybody tell me why the following code compiles and executes, yet I get no result?
>
>
>
>lcLastCell = oExcel.ActiveCell.SpecialCells(xlLastCell).Address()
>oExcel.Range("B9:" + lcLastCell).Select
>
> oExcel.Selection.FormatConditions.Delete
> oExcel.Selection.FormatConditions.Add(xlformula,'=RIGHT($B9,5)="Total"')
>
> With oExcel.Selection.FormatConditions(1).Font
> .Bold = True
> .Italic = False
> EndWith
>
> With oExcel.Selection.FormatConditions(1).Borders(xlBottom)
> .LineStyle = xlContinuous
> .Weight = xlThin
> .ColorIndex = xlAutomatic
> ENDWITH
>
>

>
>Thanks in advance for any suggestions!
>
>Andrew
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform