Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all! I need to know of a way to protect the values of variables as they
are passed between function to function. I didn't notice this at first, but it explains why my final answer was getting a number not physically posible. Here's some code to help explain... Sub Macro2() a = 1 b = 2 c = 3 dummy = Ben(a, b, c) End Sub Function Ben(x, y, z) x = y + z Ben = x End Function Note, that at the "end sub" line, the value of "a" is now 5 instead of 2... thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Split values in cells to variables | Excel Discussion (Misc queries) | |||
VBA variables retaining their values | Excel Discussion (Misc queries) | |||
how to look up values with two independent variables | Excel Worksheet Functions | |||
Changing the values of variables | Excel Programming | |||
can variables pass values | Excel Programming |