ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   variable that keeps its value until reset (https://www.excelbanter.com/excel-programming/278293-variable-keeps-its-value-until-reset.html)

Jamie Martin[_2_]

variable that keeps its value until reset
 
Hi,

How can I declare a variable that will keep its value not only after a
procedure is run, but when Excel or the computer is shut down--that will
keep its value until it is reset?

THanks,

Jamie



Robin Hammond

variable that keeps its value until reset
 
Jamie,

You would have to store it in the registry or write it to a text file.

Have a look at help on SaveSetting and GetSetting.

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Jamie Martin" wrote in message
...
Hi,

How can I declare a variable that will keep its value not only after a
procedure is run, but when Excel or the computer is shut down--that will
keep its value until it is reset?

THanks,

Jamie





bruce

variable that keeps its value until reset
 
The place you might be thinking of storing your variable
might be within your VBA code. This can be done and it
might best be stored in a little two line routine that can
be called as required.
Self modifying code is possible but you will have to
search the internet or MS Knowledgebase for a good lead.
-----Original Message-----
Jamie,

You would have to store it in the registry or write it to

a text file.

Have a look at help on SaveSetting and GetSetting.

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Jamie Martin" wrote in message
...
Hi,

How can I declare a variable that will keep its value

not only after a
procedure is run, but when Excel or the computer is

shut down--that will
keep its value until it is reset?

THanks,

Jamie




.



All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com