Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
function to return day in the form "Monday", "Tuesday" etc given . | Excel Worksheet Functions | |||
Check if cells contain the word "Thailand", return "TRUE" | Excel Worksheet Functions | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
If (A1 = "ValueA" & C1 = "ValueB") return the quantity of matches | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |