Share via

Vsto conditional formatting

Jonathan Brotto 1,076 Reputation points
2022-01-18T20:11:46.81+00:00

Trying to get the VBA conditional code into vb.net but got an error when I progress to attempt to line .FormatConditions.ReverseOrder = False

System.MissingMemberException
HResult=0x80131512
Message=Public member 'ReverseOrder' on type 'FormatConditions' not found.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>

        'conditional formatting for percent
        customerYearRng = Globals.ThisAddIn.Application.Sheets("Territory Summary").Range(Chr(65 + countYearRange) & "4:" & Chr(65 + countYearRange) & "20")
        With customerYearRng
            .FormatConditions.AddIconSetCondition()
            '.FormatConditions(FormatConditions.Count).SetFirstPriority
            '.FormatConditions(1)
            .FormatConditions.ReverseOrder = False
            .FormatConditions.ShowIconOnly = False
            .FormatConditions.IconSet.IconSets = "xl3Triangles"
            '.FormatConditions(1).IconCriteria(2)
            '.Type = xlConditionValueNumber
            '.Value = 0
            '.Operator = 7
            '.FormatConditions(1).IconCriteria(3)
            '.Type = xlConditionValueNumber
            '.Value = 0
            '.Operator = 5
        End With
Microsoft 365 and Office | Development | Other
Developer technologies | Visual Basic for Applications
Developer technologies | VB
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.