Variable that retains value after closing excel

  • Thread starter Thread starter Sandy
  • Start date Start date
S

Sandy

Is it possible to force a variable to retain its value after closing excel.
In other words when excel is opened next time the value of the variable at
close is retained?
Sandy
 
Hi Sandy,

Amongst a number of possibilities, you could write the variable's value to a
defined name in the Workbook_BeforeClose procedure and read it in the
Workbook_Open event; alternatively, you could write the value to a (hidden?)
sheet. Other possibilites would include wtiting the value to the registry or
a Workbook property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top