Solved

excel vba question by ref by value

Posted on 2014-09-29
2
141 Views
Last Modified: 2014-09-29
i have read many books and i try to explain the difference between "By Ref" and "By Value" by a good example. but could not find a good example.

can any please shed light?

thanks.
0
Comment
Question by:ProfessorJimJam
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
if you define a procedure having a parameter "by value", you cannot get have your variable get modified by the procedure, while if you have the parameter "by ref", the procedure can modify it...
see the explanations here:
http://msdn.microsoft.com/en-us/library/ddck1z30.aspx
the example is vb.net code, but the principle is exactly the same
0
 
LVL 25

Author Closing Comment

by:ProfessorJimJam
Comment Utility
thank you
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now