Jaymond Flurrie
Well-known Member
- Joined
- Sep 22, 2008
- Messages
- 919
- Office Version
- 365
- Platform
- Windows
First time trying Conditional Formatting with VBA.
I need a DataBar that is similar to manually adding one and in the Edit Formatting Rule dialog "Format all cells based on their values" in the "Edit Rule Description" has in the "Minimum" and "Maximum" as type "Automatic".
I know this all the way to adding the DataBar with Lowest Value and Highest Value in the Type.
Like:
My guess is that it is some property that needs to be set in the With-block, but what?
I need a DataBar that is similar to manually adding one and in the Edit Formatting Rule dialog "Format all cells based on their values" in the "Edit Rule Description" has in the "Minimum" and "Maximum" as type "Automatic".
I know this all the way to adding the DataBar with Lowest Value and Highest Value in the Type.
Like:
VBA Code:
Private Sub cf()
Dim target As Range
Set target = Range("C3:S3")
target.FormatConditions.Delete
Dim db As Databar
Set db = target.FormatConditions.AddDatabar
' With db
'
' End With
End Sub
My guess is that it is some property that needs to be set in the With-block, but what?