06-12-2014 12:24 AM
Hello All,
I am trying to create a test report in excel using ActiveX.
For the report i was able to add the iconset conditional format but i am having difficulties in formatting the applied icon set conditions. Such as properties like "show icon only", "Icon Set", "Value range" and so on...
what i exactly looking for is the following code in ActiveX
Columns("I:I").Select
Selection.FormatConditions.AddIconSetCondition
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1)
.ReverseOrder = False
.ShowIconOnly = True
.IconSet = ActiveWorkbook.IconSets(xl3Symbols)
End With
With Selection.FormatConditions(1).IconCriteria(2)
.Type = xlConditionValueNumber
.Value = 0
.Operator = 7
End With
With Selection.FormatConditions(1).IconCriteria(3)
.Type = xlConditionValueNumber
.Value = 0
.Operator = 7
This code is generated by record macro option from the excel sheet itself. I know that macro can be used for this issue, but the problem is for macro to execute the VB project trust relation should be enabled in the excel environment.
Here with i have attached the VI snippet used for this conditional formatting. Any suggestions are welcome.
thanks in advance