Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
make userform textbox value permanent
Hi all,
I am creating a userform for a colleague. One of my textboxes outputs the directory that is selected to save the file after the macro is complete. I have also given the user a checkbox that will hopefully make the directory to save a "permanent" value so that the next time he opens the file, that directory is preselected automatically. It will be permanent unless he selects another directory and makes the checkbox true again later. I have tried saving the UserForm1.Textbox9.Value equal to itself, but that doesn't change the value I assign it in the userform after I close the file and open it again. Any help would be appreciated! Thanks! Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
make userform textbox value permanent
VB controls do not save their information... you have to do that yourself.
You can output the value to a text file or save it in a cell on a worksheet somewhere when the workbook closes and then load it back in when the UserForm loads up (if you go with the cell idea, you can delete the cell's content after your UserForm retrieves the value. -- Rick (MVP - Excel) "Matt S" wrote in message ... Hi all, I am creating a userform for a colleague. One of my textboxes outputs the directory that is selected to save the file after the macro is complete. I have also given the user a checkbox that will hopefully make the directory to save a "permanent" value so that the next time he opens the file, that directory is preselected automatically. It will be permanent unless he selects another directory and makes the checkbox true again later. I have tried saving the UserForm1.Textbox9.Value equal to itself, but that doesn't change the value I assign it in the userform after I close the file and open it again. Any help would be appreciated! Thanks! Matt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
make userform textbox value permanent
Thanks Rick. I know I can type in a value in the text box when editing the
userform and this makes it permanent. I will go with the cell idea, though so it can be changed. Thanks again, Matt "Rick Rothstein" wrote: VB controls do not save their information... you have to do that yourself. You can output the value to a text file or save it in a cell on a worksheet somewhere when the workbook closes and then load it back in when the UserForm loads up (if you go with the cell idea, you can delete the cell's content after your UserForm retrieves the value. -- Rick (MVP - Excel) "Matt S" wrote in message ... Hi all, I am creating a userform for a colleague. One of my textboxes outputs the directory that is selected to save the file after the macro is complete. I have also given the user a checkbox that will hopefully make the directory to save a "permanent" value so that the next time he opens the file, that directory is preselected automatically. It will be permanent unless he selects another directory and makes the checkbox true again later. I have tried saving the UserForm1.Textbox9.Value equal to itself, but that doesn't change the value I assign it in the userform after I close the file and open it again. Any help would be appreciated! Thanks! Matt |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
make userform textbox value permanent
I know I can type in a value in the text box when editing
then userform and this makes it permanent. That works because it is a design-time setting (like the font color, or back color, etc.)... you can change these at run-time but those changes won't stick. -- Rick (MVP - Excel) "Matt S" wrote in message ... Thanks Rick. I know I can type in a value in the text box when editing the userform and this makes it permanent. I will go with the cell idea, though so it can be changed. Thanks again, Matt "Rick Rothstein" wrote: VB controls do not save their information... you have to do that yourself. You can output the value to a text file or save it in a cell on a worksheet somewhere when the workbook closes and then load it back in when the UserForm loads up (if you go with the cell idea, you can delete the cell's content after your UserForm retrieves the value. -- Rick (MVP - Excel) "Matt S" wrote in message ... Hi all, I am creating a userform for a colleague. One of my textboxes outputs the directory that is selected to save the file after the macro is complete. I have also given the user a checkbox that will hopefully make the directory to save a "permanent" value so that the next time he opens the file, that directory is preselected automatically. It will be permanent unless he selects another directory and makes the checkbox true again later. I have tried saving the UserForm1.Textbox9.Value equal to itself, but that doesn't change the value I assign it in the userform after I close the file and open it again. Any help would be appreciated! Thanks! Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
make filter permanent | Excel Discussion (Misc queries) | |||
make custom formatting permanent | Excel Worksheet Functions | |||
How do I make gridlines permanent? | Excel Discussion (Misc queries) | |||
Can I make "LANDSCAPE" the permanent default setting? | Setting up and Configuration of Excel | |||
HOW DO I HIDE THE ABC ( TOP ROW ) AND MAKE MY HEADDINGS PERMANENT | Excel Worksheet Functions |