on 09-18-2017 5:51 PM
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.
"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????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need any EPM function, you need some VBA training!
Before executing function:
epm.GetPropertyValue(...
You have to check that parameters are not empty:
If Range("PART_ID_L") = "" OR Range("PART_ID_1") = "" OR Range("PART_ID_2") = "" Then...
You can also use IIF to perform inline check!
User | Count |
---|---|
8 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.