Can I use OR statement with in object name
I am in dilemma.
I am using
HTMLAnchor("ID=" + MOHyperLinkID + " Index=" + MOHyperLinkIndexvalue).Click
Now over here sometimes the object is having value in Caption property and sometime it is having value in ID property.
Now I want to use the OR statement like below
HTMLAnchor("ID=" OR "Caption=" + MOHyperLinkID + " Index=" + MOHyperLinkIndexvalue).Click
But it is giving me error.
Any solution for this.
Re: Can I use OR statement with in object name
We can't use logical operactors(OR) within Object.In this case,you can use the property that is commmon for that object.If Object property is dynamic,static property can be used.I hope the below code approach will help u.
HTMLAnchor("Caption='" & MOHyperLinkID & "' Index=MOHyperLinkIndexvalue").Click