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

Answer Posted / sagar mitra

ByRef refers to the location, ByVal refers to the actual value. Also, if you are passing parameters with "ByVal" then even if the parameter values are changed, the original argument values will remain intact. But if you pass using "ByRef" then if the parameter values are changed, then the original argument value is also modified

Is This Answer Correct ?    26 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what is variant in vbscript?

557


where can i learn VB scripint ?

1595


Mention what are the rules to name variable in vbscript?

540


Which operator can be used to check if two numbers are equal or not in vbscript?

652


Why to use option explicit in vb script?

598






What are the special sub-types in vbscript?

552


If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?

534


What is the purpose of the err object in the vbscript language?

624


What are events in the vbscript language?

552


Explain about scrrun.dll in vbscript?

650


How are values assigned to the variables in the vbscript language?

575


Mention what if you do not specify anything when you call a procedure?

570


What is loose binding? Why is it not a good practice to use it?

633


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.

1848


How to make sure that items in a wintree are sorted al?

2356