Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2006
    Posts
    5

    Question Unanswered: fileDialog data type?

    This should be simple for someone out there: I want to provide a file chooser dialog box for users to determine the path for a group of Excel files I'm exporting from my database using the TransferSpreadsheet command (I want them to be separate worksheets in one workbook). For one file, I know I could use "MicrosoftExcelBiff8(*.xls)" as the file name in the TransferSpreadsheet statement, but I can't figure out how to save that file info to use for transfer of the subsequent queries/spreadsheets. I found an example in the Help menu on how to display a file chooser window & save the path, but the first line in the example, "dim fd as FileDialog", stops the compiler with an error that says "Compile Error: user-defined type not defined". I'm betting I have to add a reference to use the FileDialog data type, but I'm not sure which one - can anyone help me with this? thanks!

  2. #2
    Join Date
    Aug 2002
    Location
    Northampton, England
    Posts
    266
    Try setting a reference to Microsoft DAO 3.6 Object Library

  3. #3
    Join Date
    Nov 2006
    Posts
    5

    Question

    I've already got that one! The references I have checked are (in order): Visual Basic for Applications, Microsoft Access 11.0 Object Library, OLE Automation, Microsoft DAO 3.6 Object Library, Microsoft ActiveX Data Objects 2.1 Library, and Microsoft Calendar Control 11.0.

    Do I maybe have them in the wrong order?

  4. #4
    Join Date
    Nov 2006
    Posts
    5

    Thumbs up found it!

    to use the filedialog data type, you must have the "Microsoft Office 11.0 Object Library" reference checked. I tried it & it works!

    Thanks to everyone that replied - aa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •