J
Johnny Bright
Hi there!
I'm trying to invoke the file import window with the following code:
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = False
'.InitialFileName = txtFileName
'.Filters.Delete 1
.Filters.Add "Excel Files", "*.csv", 1
If .Show = -1 Then
txtFileName = .SelectedItems(1)
End If
End With
Set fd = Nothing
This has worked before in another application in another office, but when I
try it here at home I get a user defined type error. Perhaps I don't have
the right reference to this object. Which reference is it a part of or am I
doing something else wrong?
Thanks
J
I'm trying to invoke the file import window with the following code:
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = False
'.InitialFileName = txtFileName
'.Filters.Delete 1
.Filters.Add "Excel Files", "*.csv", 1
If .Show = -1 Then
txtFileName = .SelectedItems(1)
End If
End With
Set fd = Nothing
This has worked before in another application in another office, but when I
try it here at home I get a user defined type error. Perhaps I don't have
the right reference to this object. Which reference is it a part of or am I
doing something else wrong?
Thanks
J