ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TextBox value (https://www.excelbanter.com/excel-programming/364581-textbox-value.html)

AD108

TextBox value
 
I have a text box in a little application I am working on. I am trying to
get it to keep the current text that is typed into it to stay between calls.
(so I can close the UserForm or workbook, and still have the most recently
typed text still in the TextBox. Having trouble.

Thanks in advance for any tips.



Leith Ross[_577_]

TextBox value
 

Hello AD108,

Once the UserForm is closed, all the variables, objects and constants
are destroyed. You can choose to save the textBox text to a Worksheet
cell and reload the TextBox when the UserForm is Activated. If you wish
not to have it on a Worksheet you can save it to the registry using the
SaveSetting command and reload the TextBox at anytime using the
GetSetting command. The last choice and most involved would be to
create a file to hold the text.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=552886


Harald Staff

TextBox value
 
Hi

The content goes away when the userform is unloaded. You have to save it
somewhere. If this application is used by several users on the same pc then
save in the registry (see savesetting and getsetting in VBA help), otherwise
the simplest thing is to write it into a cell on a worksheet.

HTH. Best wishes Harald

"AD108" skrev i melding
...
I have a text box in a little application I am working on. I am trying to
get it to keep the current text that is typed into it to stay between

calls.
(so I can close the UserForm or workbook, and still have the most recently
typed text still in the TextBox. Having trouble.

Thanks in advance for any tips.





AD108

TextBox value
 
Great,
Thanks.
"Leith Ross" wrote
in message ...

Hello AD108,

Once the UserForm is closed, all the variables, objects and constants
are destroyed. You can choose to save the textBox text to a Worksheet
cell and reload the TextBox when the UserForm is Activated. If you wish
not to have it on a Worksheet you can save it to the registry using the
SaveSetting command and reload the TextBox at anytime using the
GetSetting command. The last choice and most involved would be to
create a file to hold the text.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:

http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=552886





All times are GMT +1. The time now is 04:18 PM.

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