Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional Formatting in Excel using VFP
Message
From
13/02/2001 14:15:25
Stacey Kuhlman
Merkle Direct Marketing, Inc.
Lanham, Maryland, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Conditional Formatting in Excel using VFP
Miscellaneous
Thread ID:
00475406
Message ID:
00475406
Views:
103
Using VFP6 and office automation, I've created an Excel worksheet. All of the formatting except for Conditional Formatting of cells went great. My goal is to have the cells configured so that if a negative number is entered into them in excel, the font will be red and the fill color yellow. It's something like...

WITH .Range(m.myrange)
.FormatConditions.Delete
.FormatConditions.Add(1,6,"0")
WITH .FormatCondition(1).font
.bold=.t.
.colorindex = 46
ENDWITH
.FormatCondition(1).Interior.ColorIndex = 41
ENDWITH

When I look at it in Excel, the "cell value less than 0" is indicated however, the format says "No Format Set"

I'd appreciate help with this. Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform