Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement with multi or's
#2
Solved: 11 Years, 4 Months ago
Rather than focusing on what you don't want it to do, focus on what you do want it to do.
Code:
LinkName = LinkObj.GetROProperty ("Text")
If LinkName = "Fax" Then
  'insert code that you want executed if it is Fax
ElseIf LinkName = "View"
  'insert code that you want executed if it is View
EsleIf LinkName = "Zip"
  'insert code that you want executed if it is Zip
Else
  'insert code that you want executed if it is none of the above
End If

If you don't care if it's Fax, View, or Zip and just want to execute code if it's none of these then try this.
Code:
LinkName = LinkObj.GetROProperty ("Text")
If LinkName <> "Fax" or LinkName <> "View" or LinkName <> "Zip" Then
  'insert code you want executed if it's none of these
End If
Reply


Messages In This Thread
If statement with multi or's - by mv8167 - 06-14-2011, 02:52 AM
RE: If statement with multi or's - by Brian.Osborne - 06-14-2011, 10:56 PM
RE: If statement with multi or's - by rajpes - 07-05-2011, 08:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Multi Select in UFT/ QTP vanga 0 3,517 02-25-2015, 07:03 PM
Last Post: vanga
  Multi-test Manager 8.2.4 compatibility rlin2012 4 4,953 07-16-2013, 11:24 AM
Last Post: vinod123
  Having trouble integrating QTP with Ant and a multi-module Adobe Flex application peachy32514 0 4,807 03-24-2012, 02:39 AM
Last Post: peachy32514
  Batch Run Vs. Multi Data Set for different test Scenario... Suba 0 2,343 03-29-2011, 06:33 PM
Last Post: Suba
  Multi-Line comment in 8.2 ver. pramod7385 1 3,695 02-25-2010, 05:04 PM
Last Post: sreekanth chilam

Forum Jump:


Users browsing this thread: 1 Guest(s)