|
-
Mar 2nd, 2009, 08:27 AM
#1
Thread Starter
Don't Panic!
[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)
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Mar 2nd, 2009, 11:58 AM
#2
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....
-
Mar 3rd, 2009, 12:33 AM
#3
Addicted Member
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)
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
|
Click Here to Expand Forum to Full Width
|