+ Reply to Thread
Results 1 to 5 of 5

Query Wizard

  1. #1
    Registered User
    Join Date
    11-22-2007
    Posts
    26

    Query Wizard

    Greetings,

    Would you be so kind and let me know how I can make wizard prompt user to select a file to open instead of haing a specific file linked to the connection like in the following example.

    Thank you for your help.
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 07-10-2008 at 11:42 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello iguss,

    I have added some code to allow the user to select the file. The "Open" file dialog defaults to the file path you have in your code.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-22-2007
    Posts
    26

    query table

    Thank you so much, I will buy you a dring when I will be in the area.

    There seems to be a small problem though, I get an error at

    With ActiveSheet.QueryTables.Add(Connection:= _
    FileToOpen _
    , Destination:=Range("A1"))

    Would you be able to identify the problem.

    Thank you in advance

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello iguss,

    Sorry about that, I made a typographical error in the code. I have tested this version. I changed the macro name. You should not use keywords or event names for macros.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    11-22-2007
    Posts
    26

    Thumbs up Query Table

    Thank you so much, works like a charm.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1