Skip to Content
avatar image
Former Member

VBA invalid member

Hi guys,

I developped the following code in VBA for a EPM report:

If Range("ID_INTERNAL") <> "" And Range("FORM_TYPE").Value = "P_FORM_TYPE_PART" Then
        If epm.GetPropertyValue(CxACTV, Range("PART_ID_L"), "PART_SHARE") <> Range("PART_SHARE_L") Or _
            epm.GetPropertyValue(CxACTV, Range("PART_ID_1"), "PART_SHARE") <> Range("PART_SHARE_1") Or _
            epm.GetPropertyValue(CxACTV, Range("PART_ID_2"), "PART_SHARE") <> Range("PART_SHARE_2") Then
                MsgBox "Consolidation Required"
end if


The problem is that sometimes : PART_ID_L and PART_ID_1 and PART_ID_2 can be empty, and they generate an error : Invalid member

How can i correct this problem?

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 18, 2017 at 06:13 PM

    "How can i correct this problem?" - sorry, but you are not explaining what do you want to have if "PART_ID_L and PART_ID_1 and PART_ID_2 can be empty"...

    You can always test:

    If Range("PART_ID_L")="" Then...

    What is the issue????

    Add comment
    10|10000 characters needed characters exceeded