-
Yeah, you don't want to start randomly changing data types, to hope something works. You'll get a different error message, but the root of the problem is the same. Why don't you try something like this, just to test that functionality...
[VBA]
Sub Test()
MsgBox fGetFilePath
End Sub
Public Function fGetFilePath() As String
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "My Filter", "*.dotm"
If .Show = 0 Then
Exit Function
End If
fGetFilePath = .SelectedItems(1)
End With
End Function
[/vba]
I'm not totally familiar with the file picker, and if I had to guess, I would guess that you're getting some kind of incomplete return based on the multiple application of filters on a persistent object. Because the usage is really really simple.
Try modifying just the function above and seeing if your message box result continues to be an empty string, or if it is actually representative of the path you want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules