Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you do functions by calling filename or any other better ways?
#1
Not Solved
I have functions that I use all the time in my automation.

1. Can I save the function to another filename?
2. If I save to another filename how do I evoke it?
3. Is there any other better way?

==============

Below is example of my function:

Code:
Dim OutDate,ReturnDate,RndValue

' Initialize random-number generator
Randomize
' Generate random value between 200 and 300
RndValue = Int(  (300-200 +1)* Rnd + 200)
'msgBox(RndValue)

OutDate = DateAdd("d", RndValue, Date)
'msgBox(OutDate)

ReturnDate = DateAdd("d", RndValue+10, Date)
'msgBox(ReturnDate)
================

My code that calls it:

Code:
Browser("Delta Air Lines - Airline").Page("Delta Air Lines - Airline").WebEdit("departureDate_0").Set OutDate
Reply


Messages In This Thread
Can you do functions by calling filename or any other better ways? - by chong67 - 05-25-2012, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 3,261 08-22-2013, 11:43 AM
Last Post: smartkarthi
  exit parent functions as well Shridevi.Salagare 3 3,917 07-31-2013, 12:15 AM
Last Post: Ankur
  Datatable in functions shwetasharma 2 3,559 03-26-2013, 08:00 AM
Last Post: sams001
  Problem with using two functions in the same action mhanaan 2 3,060 09-14-2012, 10:09 PM
Last Post: mhanaan
  Calling a HP Service Test Skript Gandalf2005 0 2,155 09-05-2012, 07:53 PM
Last Post: Gandalf2005

Forum Jump:


Users browsing this thread: 3 Guest(s)