Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel replace function
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01096827
Message ID:
01101852
Views:
10
>>I don't know, I get them by simple using MsgBox(xlByRows) in Excel Macro Editor :o)
>>I'am just working for search and fromat row when found. When I finish, I'll let you know. After that I'll try Cetin's code. I am sure it is working somehow :o)
>
>I don't know, this conditional formatting was not saved for me. E.g. when I made Excel visible I saw the formatting for that column, but after I closed the file the formatting was gone. The REPLACE works fine, e.g. it changes formatting of the TOTALS word just fine. May be it's an easier approach?

I was s sure that Catin's code shoud works :o) and voila it works:
He just has a little typo in his code:
oExcel.Range([A1], oExcel.Selection.SpecialCells(xlLastCell)).Select
oExcel.Selection.FormatConditions.Delete
oExcel.Selection.FormatConditions.Add(xlExpression,, '=UPPER(Right($A1;6))="TOTAL:"') && Here is the typo all functions in Excel works with [;] as separator not with comma

With oExcel.Selection.FormatConditions(1)
    .Font.Bold = .T.
    .Interior.ColorIndex = 4
Endwith
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