Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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




.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error '91' Object variable or With block variable not set Alec Coliver Excel Discussion (Misc queries) 2 October 24th 09 02:29 PM
"Too Many Cell Formats" Got Fix! But ... need VBA Variable reset EagleOne Excel Discussion (Misc queries) 1 August 17th 06 12:38 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"