Hi

I'm trying to apply conditonal formatting with TrafficLights using below access VBA but getting error "object doesn't support this property or method". I'm new to Access VBA please let me know what I'm doing wrong.

Code:
Sub setRAGStatusFontColorIcon(strRange As String)
    Dim objISet As Excel.IconSetCondition

    With objXLApp
        .FormatConditions.Delete
        Set objISet = .FormatConditions.AddIconSetCondition
        .FormatConditions(.FormatConditions.count).SetFirstPriority
        With objISet
            .ReverseOrder = True
            .ShowIconOnly = False
            .IconSet = ActiveWorkbook.IconSets(xl3TrafficLights1)
            With .IconCriteria(2)
                .Type = xlConditionValueFormula
                .Value = 1
                .Operator = 5
            End With
            With .IconCriteria(3)
                .Type = xlConditionValueFormula
                .Value = 0.9
                .Operator = 5
            End With
        End With
    End With
End Sub