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

2075


while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans

1826


What purpose does ‘on error resume next’ serves?

828


Mention what is the difference between vbscript and vba?

761


Can anyone send me a vb script function for verifying the functionality of active links on a web page

1812


Explain about the functionality of vb script?

794


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

3185


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1920


How to write functions and sub in vb script?

847


Differentiate javascript and vbscript?

797


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1664


Which operator is used to perform the comparison among 2 operands in the vbscript language?

748


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

790


What are events in the vbscript language?

821


Explain the support of asp for vb script functionality?

872