+ Reply to Thread
Results 1 to 6 of 6

VBA Macro Power Query with weblink and name from two cell value

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    Montreal
    MS-Off Ver
    2010
    Posts
    23

    VBA Macro Power Query with weblink and name from two cell value

    Good morning folkls.

    I'm a bit in a jam.

    I'm trying to make multiple query based on two column.

    Here what I have for now:

    Please Login or Register  to view this content.
    I'm trying firstly to change the adress in the code "https://Webpage.com" and to use "Webquery" adress that is in a cell.
    Also to change the name "Test" with "Queryname" name that is also in cell.

    Anyone can help me with that?

    That would be greatly appreciated.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: VBA Macro Power Query with weblink and name from two cell value

    Like this...
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    02-12-2016
    Location
    Montreal
    MS-Off Ver
    2010
    Posts
    23

    Re: VBA Macro Power Query with weblink and name from two cell value

    WOW!!! Quick reply.

    But just replacing ""https://Webpage.com"" with " & WebQuery & " doesn't work... it gives me a error at .Refresh BackgroundQuery:=False.

    Also I tryed just to replace Location=Test with Location=" & QueryName & " and it give me a error at the same place.
    And what about the other places with TEST

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: VBA Macro Power Query with weblink and name from two cell value

    I cannot test it but give this a try...
    Please Login or Register  to view this content.
    Since WebQuery and QueryName depends upon the ActiveCell, make sure the correct cell is active. Or better first debug the code by pressing F8 key and check the values of WebQuery and QueryName variables.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: VBA Macro Power Query with weblink and name from two cell value

    Duplicate post.

  6. #6
    Registered User
    Join Date
    02-12-2016
    Location
    Montreal
    MS-Off Ver
    2010
    Posts
    23

    Re: VBA Macro Power Query with weblink and name from two cell value

    Ok... For the Query naming... it works.

    As for the " & WebQuery & ", it work with """ & WebQuery & """.

    Thx for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  2. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  3. Replies: 2
    Last Post: 12-08-2017, 03:13 PM
  4. Using weblink listed in excel column for Power Query
    By asha3010 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-05-2017, 10:18 AM
  5. Macro to convert Power Query Worksheet to standard workbook
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2015, 01:34 AM
  6. Macro to Open Weblink
    By Amarjeet Singh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2009, 05:06 AM

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