[Access 2003] FileDialog problems
Hi,
I have recently been getting error messages with the FileDialog box variable in my code.
Code:
Set fd = FileDialog(msoFileDialogFilePicker)
fd.AllowMultiSelect = False
fd.Filters.Clear
Select Case fraPaths
Case 1, 2, 3, 5
Case Else
'fd.Filters.Add "All files", "*.*"
'fd.FilterIndex = 1
End Select
fd.Show
The above is the sort of code I was using, however the two lines remarked out now cause errors when not remarked out.
Was there an upgrade that broke the working of this? My code appears to match what the help files say it should.
I was going to post up the error message - but its running ok now.
Weird. Anyway if it does error again I will post up its message.
Has anyone else had this and if so what was the cause? Run time problem ? Running out of memory?
Edit:
Happened again
Object doesn't support this property or method (438)
Re: [Access 2003] FileDialog problems
Are you sure you haven't accidentally changed "Application.FileDialog" to "FileDialog"? You normally need to qualify that it comes from the Application object. If I do that, it works fine for me in Office XP....
Re: [Access 2003] FileDialog problems
as suggested by zaza, code like this
Code:
'Declare a variable as a FileDialog object.
Dim fd As FileDialog
'Create a FileDialog object as a File Picker dialog box.
Set fd = Application.FileDialog(msoFileDialogFilePicker)