default folder location on selecting a file

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 00:22
Joined
Nov 8, 2005
Messages
3,309
Hi guys - have "borrowed" the code below and it does what it meant to do
however i want it to point/start at a particualr folder "C\whizbang\TEMP
what do i need to do to redirct it there ?
G:)

Private Sub Command15_Click()




Const msoFileDialogFilePicker As Long = 3
Dim objDialog As Object

Set objDialog = Application.FileDialog(msoFileDialogFilePicker)

With objDialog
.AllowMultiSelect = False
.Show
If .SelectedItems.Count = 0 Then
MsgBox "No file selected."
Else
Me.FileNameTextBox.Value = Dir(.SelectedItems(1))
End If
End With
End Sub
 
Gary
The code repository is a moderated area. It is used for working code samples - NOT for questions.
I have therefore moved your thread to the modules and vba forum.
Please read the sticky posts at the top of the repository for information
 
today's muppet award goes to ... Me..
thanks:o everyone
G
 

Users who are viewing this thread

Back
Top Bottom