Use
Sub GetFolder()
Dim strFolder as String
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.Title = "Select the folder into which the documents will be saved."
If .Show = -1 Then
strFolder = .SelectedItems(1) & ""
Else
MsgBox "The documents will be saved in the default document file location."
strFolder = ""
End If
End With
End Sub
-- Hope this helps.
Doug Robbins - Word MVP,
dkr[atsymbol]mvps[dot]org
Posted via the Community Bridge
"CraigBr1" wrote in message news:*** Email address is removed for privacy ***...
Hi
I currently have a macro that includes code to ask the user what filename they want to assign and then after the user enters a filename, it saves that filename in a specific place on the company network. (such as X:\Projects)
=======
file = InputBox("what do you want to call your file")
ActiveWorkbook.SaveAs Filename:="X:\Projects" & file, FileFormat:= _
xlCSV, CreateBackup:=False
======
Question: What code can I use to allow the user during the macro run to browse the company network and select a specific folder so the file, after they give it a name, is then saved in whatever folder they select (and not always to X:\Projects)??
Thanks very much
Craig
Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org