Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default How do I write code to preserve variables values for future use.

Variables lose their values after the procedure is executed. How can on write
a code to store a value obtained from an inputb box within a code that can be
used next day when I run the code again. In other words, I would like to
retain the last value obtained and somehow keep it in the code for the next
execution of the code.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How do I write code to preserve variables values for future use.

Hi Paul,

Two approaches:

1. Store your values in a xlVeryHidden worksheet.

2. Use SaveSettings or GetSettings method to save and retrieve values from
the registry.

Frederick Chow
Hong Kong
"Paul" wrote in message
...
Variables lose their values after the procedure is executed. How can on
write
a code to store a value obtained from an inputb box within a code that can
be
used next day when I run the code again. In other words, I would like to
retain the last value obtained and somehow keep it in the code for the
next
execution of the code.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default How do I write code to preserve variables values for future use.

You could always store it somewhere in the sheet or in named ranges in the
"variables" sheet which can be hidden.

--
Don Guillett
SalesAid Software

"Paul" wrote in message
...
Variables lose their values after the procedure is executed. How can on
write
a code to store a value obtained from an inputb box within a code that can
be
used next day when I run the code again. In other words, I would like to
retain the last value obtained and somehow keep it in the code for the
next
execution of the code.



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
Future Values LaVerna Excel Worksheet Functions 4 March 28th 07 10:48 PM
Code for optimization, ReDim Preserve not handling it well, HELP please! [email protected] Excel Programming 0 November 2nd 05 08:18 AM
Write variables from a loop, once only Novaloc Excel Programming 1 October 11th 05 04:10 AM
Convert Formulas to Values and Preserve Formatting Tenacity Excel Discussion (Misc queries) 2 August 12th 05 01:00 AM
Help with forecasting future values based on a current value? Mark Wielgus[_2_] Excel Programming 0 July 16th 04 07:28 AM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"