+ Reply to Thread
Results 1 to 2 of 2

web query in Macro - how to embedded in file, not a path to c Drive

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    web query in Macro - how to embedded in file, not a path to c Drive

    Hi,

    I have a Macro what calls a web query. When I send the excel file to my team members it errors as they don't have the query file
    I thought it would be embedded in the excel file, but it uses a path specific to me


    How would you change this so any one can use it

    When i view existing connection, it is in the work book
    ExistingConnections.PNG

    Thanks in advance
    Mike



    Sub Update_WQ_3()
    '
    ' Update_WQ_3 Macro
    '

    '
    Sheets("RAW").Select
    Range("A1").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "FINDER;C:\Users\mcarpend\Documents\My Data Sources\DD_GetInitialUsageData.iqy" _
    , Destination:=Range("$A$1"))
    Last edited by asyahdo; 06-13-2013 at 09:52 PM.

  2. #2
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: web query in Macro - how to embedded in file, not a path to c Drive

    Found this..... it works
    Sub URL_Get_Query()
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;http://quote.money.cnn.com/quote/quote?symbols=[""QUOTE"",
    ""Enter stock symbols separated by commas.""]", _
    Destination:=Range("a1"))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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