Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another approach to remember values is to declare a Static value in a sub:
Sub test() Static L As Long If L = 0 Then L = 1 L = Doubled(L) MsgBox "L is now " & L End Sub Function Doubled(X As Long) As Long Doubled = X + X End Function I'm not too sure what your question really is. If you want to pass variables, it's done like above. If you want to run a Sub from a function in a cell, no that is not possible. -- HTH. Best wishes Harald Followup to newsgroup only please "LizUrish" skrev i melding ... Is it possible to use a subprocedure within a function? How would you refer to the subprocedure? I'm trying to create a variable in a subprocedure that is updated w/ a function, so that the vairable holds the value and can be used the next time the function is called upon. Any help would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Separating sub procedures | Excel Discussion (Misc queries) | |||
VBA function Procedures.... | Excel Worksheet Functions | |||
VBA functions and Procedures.... | Excel Worksheet Functions | |||
what's wrong with this sub procedures? | Excel Programming | |||
VBA -- procedures as arguments? | Excel Programming |