Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Simple question about FORM / SAVE & EXCEL

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Simple question about FORM / SAVE & EXCEL

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
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
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple form question Stuart[_21_] Excel Programming 3 May 9th 05 08:29 PM
User Form Interface .... really a simple question! monir Excel Programming 8 April 24th 05 08:14 PM
Simple form question Stuart[_21_] Excel Programming 5 March 12th 05 04:56 PM
VBA Question - Canceling a 'Save As' command from a user form Jake Marx[_3_] Excel Programming 2 May 6th 04 10:10 PM


All times are GMT +1. The time now is 10:29 AM.

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

About Us

"It's about Microsoft Excel"