Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!,
A simple macro opens a form with -a simple text input box (which ask for a file) i.e. the default path and -a command button which starts a macro. Private Sub Workbook_Open() myForm.Show At the end of the macro I'd like to change the default value for the text input box with the text (path) the user entered and save the file. I can't do that. Even if I save the Excel file with the diskette icon (after changing the value) or Activeworkbook.save , the next time I start the Excel the input box of the form has still its original default value. Where did I wrong?. Thanks, Ale. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alex,
I would save the path to a cell on a worksheet (which could be hidden). Then when the form is initiated, set the text input box to the saved data - e.g. save the data when the form closes with something like: Private Sub UserForm_Terminate() Sheets("Sheet3").Range("A4") = TextBox1 End Sub and when the form initiates use something like: Private Sub UserForm_Initialize() TextBox1 = Sheets("Sheet3").Range("A4") End Sub HTH Tim "Alex" wrote in message oups.com... Hello!, A simple macro opens a form with -a simple text input box (which ask for a file) i.e. the default path and -a command button which starts a macro. Private Sub Workbook_Open() myForm.Show At the end of the macro I'd like to change the default value for the text input box with the text (path) the user entered and save the file. I can't do that. Even if I save the Excel file with the diskette icon (after changing the value) or Activeworkbook.save , the next time I start the Excel the input box of the form has still its original default value. Where did I wrong?. Thanks, Ale. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Simple form question | Excel Programming | |||
User Form Interface .... really a simple question! | Excel Programming | |||
Simple form question | Excel Programming | |||
VBA Question - Canceling a 'Save As' command from a user form | Excel Programming |