Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I have code that prompts the user for some sort of input, is it possible
to have store the value of the variable so the next time the macro runs, it's available? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
As long as next time is still within the same Excel session, create a public
variable and store it there. -- __________________________________ HTH Bob "Steve" wrote in message ... If I have code that prompts the user for some sort of input, is it possible to have store the value of the variable so the next time the macro runs, it's available? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Store it in a public variable, or, if you want it the next time you open, a
cell public savethis sub() ddd savethis="OK" end sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Steve" wrote in message ... If I have code that prompts the user for some sort of input, is it possible to have store the value of the variable so the next time the macro runs, it's available? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If its a continuous segment of code, or one macro jumping to another yes.
Otherwise, I'd have the code write the value to a cell somewhere, and then refer to that cell. (maybe do an if blank check or something) -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Steve" wrote: If I have code that prompts the user for some sort of input, is it possible to have store the value of the variable so the next time the macro runs, it's available? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Steve
Refer the below link to get a better understand of variables and scope. http://www.ozgrid.com/VBA/variable-scope-lifetime.htm If this post helps click Yes --------------- Jacob Skaria "Steve" wrote: If I have code that prompts the user for some sort of input, is it possible to have store the value of the variable so the next time the macro runs, it's available? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can i link a variable cost code with a variable sum | Excel Discussion (Misc queries) | |||
Excel quits unexpectedly | Excel Worksheet Functions | |||
Circular Reference quits | Excel Discussion (Misc queries) | |||
VBA Code - NAME SEVERAL VARIABLE cells | Excel Worksheet Functions | |||
variable code?? | Excel Discussion (Misc queries) |