Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation - ConditionalFormat
Message
From
24/02/2004 03:45:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/02/2004 19:54:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00878157
Message ID:
00880190
Views:
16
>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

Andrew,
I assume xlformula is meant to be xlexpression constant. Your parameters are wrong (2nd parameter which you should omit is missing) :
Add(xlformula,,'=RIGHT($B9,5)="Total"')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform