What is the difference between ByRef and ByVal.
When to use ByRef and ByVal

Answer Posted / fgf

Small correction: we have to call the function

Function abc(ByRef var)
var=var+1
End Function

Dim x:x=2
Call abc(x)
Msgbox x

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

1820


Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

1849


How do you declare a variable in vbscript?

628


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

510


Which data type/types are supported by vbscript language and what are their specialties?

596






Illustrate briefly about the different types of statement

2025


how to check whether link is disabled in QTP??

5631


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

607


How can you destroy an object in vbscript?

642


Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?

2589


How to open browser in vb script?

584


How to replace junk code recorded by QTP with a mall function.

1646


Explain the .wsf files?

533


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

871


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2903