ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving variables in XLA's (https://www.excelbanter.com/excel-programming/303695-saving-variables-xlas.html)

Paul

Saving variables in XLA's
 

I have written code for a userform to be displayed and
give the user the ability to change values by having the
text boxes reference a cell in a work sheet.

The issue I have is that when I save file as an XLA it
modifies the variables while the XLA is running yet it
does not save the new variables if I close and reload the
XLA.

Can this be done without having to create an external
data variable file to be read by the XLA?

Tom Ogilvy

Saving variables in XLA's
 
there is no implicit ability to save variables. You would need to record
the values some place and make sure they were saved with the file, then
retrieve the saved values when appropriate.

--
Regards,
Tom Ogilvy

"Paul" wrote in message
...

I have written code for a userform to be displayed and
give the user the ability to change values by having the
text boxes reference a cell in a work sheet.

The issue I have is that when I save file as an XLA it
modifies the variables while the XLA is running yet it
does not save the new variables if I close and reload the
XLA.

Can this be done without having to create an external
data variable file to be read by the XLA?




Dave Peterson[_3_]

Saving variables in XLA's
 
You have to store them somewhere.

You could use a worksheet in the addin and save the addin when that stuff
changes.

You could use that external file.

you could use the windows registry.

Paul wrote:

I have written code for a userform to be displayed and
give the user the ability to change values by having the
text boxes reference a cell in a work sheet.

The issue I have is that when I save file as an XLA it
modifies the variables while the XLA is running yet it
does not save the new variables if I close and reload the
XLA.

Can this be done without having to create an external
data variable file to be read by the XLA?


--

Dave Peterson



All times are GMT +1. The time now is 06:30 PM.

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