Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is passing by reference?

passing Reference
0
0 Posted

What is passing by reference?

0
0

Arguments are either passed by reference or by value. When they are passed by value, they cannot be changed by the procedure or function they are passed to. They *can* be altered when passed by reference, since passing by reference is just passing the address. Note that procedures are less strict about variable types when you use BYVAL. If you declare that your Sub takes a Variant, VB takes that seriously and gives a nasty “mismatch error” if you try to pass ie. a string to it. Make it ByVal (at the cost of some speed) and your sub will be more tolerant. Commented by :shabir_aspnet@yahoo.co.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123