General information
Category:
Coding, syntax & commands
Title:
Conditional Formatting in Excel using VFP
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only