This code should get you the full path of the selected file...
'browse for a file name
Public Function getFolderPath()
getFolderPath = MsgBox("Selected File: " & BrowseForFile("Choose
a folder...", 3))
End Function
'this function returns a file name that the user selected
Public Function BrowseForFile(startFileName As String, fileFilterIndex
As Integer) As String
Dim selFile, oDlg
Set oDlg = CreateObject("UserAccounts.CommonDialog")
With oDlg
.Filter = "PowerPoint (*.ppt)|*.ppt|Excel (*.xls)|*.xls|All
Files (*.*)|*.*"
.FilterIndex = fileFilterIndex
.FileName = startFileName '"Leave as is for new sheetmask..."
'.flags = &H200 'this is for multiple files selection
'.InitialDir = "C:\temp"
selFile = .ShowOpen
End With
If selFile <> 0 Then _
BrowseForFile = oDlg.FileName
Set oDlg = Nothing
End Function