J
Jeff
Hi,
I was trying to figure out how to return a value from a "Sub" procedure. I
understand that if you write a function you can set a value equal to that
function and that will return the value. For example
Public Function TestFunction(iVal as integer)
(
TestFunction = iVal * iVal
)
Var = TestFunction(4) ' will return 4 * 4 to the variable "Var"
But in a Sub
Sub TestSub(iVal as integer)
(
TestSub = iVal * iVal
)
Call TestSub
Does not work. I dont want to use functions because I cannot do as much as
in a sub and this is just a simple example, I forget the rules but I dont
think you can edit ranges or edit objects.
I was trying to figure out how to return a value from a "Sub" procedure. I
understand that if you write a function you can set a value equal to that
function and that will return the value. For example
Public Function TestFunction(iVal as integer)
(
TestFunction = iVal * iVal
)
Var = TestFunction(4) ' will return 4 * 4 to the variable "Var"
But in a Sub
Sub TestSub(iVal as integer)
(
TestSub = iVal * iVal
)
Call TestSub
Does not work. I dont want to use functions because I cannot do as much as
in a sub and this is just a simple example, I forget the rules but I dont
think you can edit ranges or edit objects.