Results 1 to 3 of 3

Thread: [Access 2003] FileDialog problems

  1. #1

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    [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)

    BOFH Now, BOFH Past, Information on duplicates

    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...

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    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....
    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

  3. #3
    Addicted Member
    Join Date
    Jan 2009
    Posts
    233

    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
  •  



Click Here to Expand Forum to Full Width