Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File directory
I am having trouble finding help on what i am looking to do, so i am hopeing
someone here can help me. I have a user form that has a text box and a button in it. When the button is clicked i want a file directory to show up so that the user can select a location, particular folder, and click ok. This location will then be put into the textbox. The reason is that there are a few other text boxes where the file name is entered and then another button that will save as that name in the chosen location. Thanks in advance for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File directory
i did get this working, but not quite what i want.
Private Sub CommandButton3_Click() Dim TheFile As Variant TheFile = Application.GetSaveAsFilename("C:\Temp\", , , "PLEASE CHOSE FILE LOCATION", "SAVE HERE") If TheFile = False Then MsgBox "You cancelled" Else Me.TextBox3.Value = TheFile End If End Sub TimB wrote: I am having trouble finding help on what i am looking to do, so i am hopeing someone here can help me. I have a user form that has a text box and a button in it. When the button is clicked i want a file directory to show up so that the user can select a location, particular folder, and click ok. This location will then be put into the textbox. The reason is that there are a few other text boxes where the file name is entered and then another button that will save as that name in the chosen location. Thanks in advance for any help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
File directory
Jim Rech has a BrowseForFolder routine at:
http://www.oaltd.co.uk/MVP/Default.htm (look for BrowseForFolder) John Walkenbach has one at: http://j-walk.com/ss/excel/tips/tip29.htm If you and all your users are running xl2002+, take a look at VBA's help for: application.filedialog(msoFileDialogFolderPicker) TimB wrote: I am having trouble finding help on what i am looking to do, so i am hopeing someone here can help me. I have a user form that has a text box and a button in it. When the button is clicked i want a file directory to show up so that the user can select a location, particular folder, and click ok. This location will then be put into the textbox. The reason is that there are a few other text boxes where the file name is entered and then another button that will save as that name in the chosen location. Thanks in advance for any help. -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
File directory
Tim,
Here's one way: http://vbnet.mvps.org/code/browse/browsefolders.htm I believe XL2003 and up have a built in dialog to do the same. NickHK "TimB" <u32108@uwe wrote in message news:6e74b2f7ac03c@uwe... I am having trouble finding help on what i am looking to do, so i am hopeing someone here can help me. I have a user form that has a text box and a button in it. When the button is clicked i want a file directory to show up so that the user can select a location, particular folder, and click ok. This location will then be put into the textbox. The reason is that there are a few other text boxes where the file name is entered and then another button that will save as that name in the chosen location. Thanks in advance for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
file save error: the file or directory cannot be created | Excel Discussion (Misc queries) | |||
Excel should let me sort the file directory when saving a file | Excel Discussion (Misc queries) | |||
Combine all text file in directory into one file. | Excel Programming | |||
File directory into a listbox | Excel Programming | |||
get path - save new file - same sub-directory as existing file | Excel Programming |