default folder location on selecting a file (1 Viewer)

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 12:16
Joined
Nov 8, 2005
Messages
3,294
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
 

isladogs

MVP / VIP
Local time
Today, 20:16
Joined
Jan 14, 2017
Messages
18,219
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
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 12:16
Joined
Nov 8, 2005
Messages
3,294
today's muppet award goes to ... Me..
thanks:eek: everyone
G
 

Users who are viewing this thread

Top Bottom