How to return a value from function...?
you should not tell msgbox, print.. etc.,
Answer Posted / bfakruddin
Function MyFunction(Num)
MyFunction=Num+1
End Function
Num=InputBox("Enter a Number")
call MyFunction(Num)
msgbox MyFunction 'It returns Num+1 value calculated in
Function
Just we have to use the Function Name to return a value...
and we can use that value out of that function...
One more question Can we return more than 1 value from
functions?
visit for qtp info http://qtptesters.wordpress.com
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Why to use option explicit in vb script?
what is the object hyrarchy in QTP for a web based application
Mention what is the difference between vbscript and vba?
How do you declare a variable in vbscript?
How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz
How to declare an array in vbscript?
What is vbscript?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
What are the 2 ways in which a variable can be declared in the vbscript language?
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
give me any information abou vb script books learn quckly
Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it
Which operator is used to concatenate the 2 values in the vbscript language?
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
What is event handling in vbscript?