Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
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
make filter permanent Paul Kraemer Excel Discussion (Misc queries) 3 April 3rd 23 02:24 PM
make custom formatting permanent simha Excel Worksheet Functions 1 November 15th 05 11:29 PM
How do I make gridlines permanent? namrok29 Excel Discussion (Misc queries) 2 August 4th 05 10:11 PM
Can I make "LANDSCAPE" the permanent default setting? jamie_moore Setting up and Configuration of Excel 2 July 6th 05 05:16 PM
HOW DO I HIDE THE ABC ( TOP ROW ) AND MAKE MY HEADDINGS PERMANENT TheBankerGuy Excel Worksheet Functions 1 April 20th 05 09:04 PM


All times are GMT +1. The time now is 02:37 PM.

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

About Us

"It's about Microsoft Excel"