Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exit parent functions as well
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Assign some unique value just before you wish to Exit the first function. Check for that return value using a conditional statement and Exit if that matches. You can extend this logic to any number of nested function calls, just need to have a unique return key

Code:
Function Ex1()    
    Ex1 = 0
    Exit Function
End Function

Function Ex2()
    Ret = Ex1()
    If Ret = 0 Then
    msgbox Ret
    'Exit Function    
    End If
End Function

Call Ex2()

Hope that helps!
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Messages In This Thread
RE: exit parent functions as well - by basanth27 - 07-30-2013, 08:43 AM
RE: exit parent functions as well - by Ankur - 07-31-2013, 12:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get the links which appears on mouse hover of parent link rajendra649 9 35,593 03-10-2017, 06:35 PM
Last Post: satish00k
  verify that parent properties match object currently displayed in your application. sona 0 3,137 02-21-2016, 12:00 PM
Last Post: sona
  How to write a script for fly out menus (Parent - Child - Sub Child) rajkumarsm 3 4,728 09-02-2014, 10:01 AM
Last Post: vinod123
  Close on Exit Issue in QTP 11.0 EGBELL 1 3,204 02-02-2014, 03:39 PM
Last Post: EGBELL
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 3,222 08-22-2013, 11:43 AM
Last Post: smartkarthi

Forum Jump:


Users browsing this thread: 2 Guest(s)