Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    QUERY calls in EX97 & 2000 (EXCEL 97/2000)

    In a VBA module I'm calling MS-QUERY in EX2000. Here's the call (got this trick from somewhere else; seems to be a valid call; the QUERY-addin itself is locked):

    ReturnedRows = QueryGetDataDialog(strConnection, strQueryText, False, True, False, rngDestination, True)

    If you make an Auto_Open and put this line in (remove all others incl. Option Explicit) and then close (save) and open the file you get a compile error (because it doesn't know what the QueryGetDataDialog-call is).
    In my case, this doesn't happen as in the REFERENCES section of my Project-Explorer window I have:
    "Reference to XLQUERY.XLA".

    Next, I have users run this sheet on an EXCEL97 system... They get a compile error. Here's the only thing that allows this still to work... (but this has to be done each time).
    1. Open EXCEL97 and switch OFF the EX97 MSQUERY addin
    2. Load my program (or your example as indicated above) - you get the error
    3. Switch-on the MSQUERY addon
    4. Close my program (no save needed)
    5. Re-load my program

    Anyone who understands how & why...???

    I have a workaround by giving the EX97 users also the EX2000 XLQUERY.XLA addin in the same directory as my program.

    Erik Jan

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: QUERY calls in EX97 & 2000 (EXCEL 97/2000)

    Erik Jan,

    I am not sure if you are really asking something here, but isn't this something similar as your post of some time ago when you wanted to distibute an application that also used a dll (<A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=xl&Number=59288&page=&view= &sb=&o=&vc=1>this thread</A>). Shouldn't you add some code to be sure that the reference to the query addin is not broken?

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: QUERY calls in EX97 & 2000 (EXCEL 97/2000)

    Thanks Hans,

    Didn't realize this might apply here as well. I'll give this a go sometime and will report back here with what I get.

    Erik Jan

Posting Permissions

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