09-12-2011, 10:37 PM
I have 8 dialog boxes that Can open depending on a link. There are just to many reports and name changes to track which report will use which dialog box. So, my code looks at each dialog box that opens and determines my the characteritics which dialog box has opened, then runs my code for the test.
My code:
But I noticed in my Results, for each object that the Flags are not found, I recive a Warning Message: "The object was not found using the test object description. Check the object's properties". Which is correct as the correct dialog box for these does not exist. Continuing on in the code will find the correct Flag matches, or end in error.
How can I turn off the Warning when/if the first, second ... etc If/Then statement is not encountered?
Any ideas?
My code:
Code:
If blFlagA1="True" AND blFlagA2="True" AND blFlagA3="True" AND blFlagA4="True" Then
...
End If
If blFlagB1 = "True" AND blFlagB2 = "True" Then
...
End If
If blFlagCA1="True" AND blFlagC2="True" AND blFlagC3="True" Then
...
End If
...
But I noticed in my Results, for each object that the Flags are not found, I recive a Warning Message: "The object was not found using the test object description. Check the object's properties". Which is correct as the correct dialog box for these does not exist. Continuing on in the code will find the correct Flag matches, or end in error.
How can I turn off the Warning when/if the first, second ... etc If/Then statement is not encountered?
Any ideas?