Solved

excel vba question by ref by value

Posted on 2014-09-29
2
157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40349436
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 26

Author Closing Comment

by:ProfessorJimJam
ID: 40349437
thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
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.

691 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