+ Reply to Thread
Results 1 to 4 of 4

VBA Recording Power Query not working

  1. #1
    Forum Contributor
    Join Date
    09-24-2017
    Location
    Vic Australia
    MS-Off Ver
    Office 365 Apps for enterprise
    Posts
    147

    VBA Recording Power Query not working

    Good afternoon everyone

    I am having a problem with Recording a Marco with Power Query

    I set up a Excel sheet with Power query in Office 365 working at home
    As my work only runs office 2013 I need to know change all the code over I have set up both Office 365 and Office 2013 on my home PC correctly using office 2013

    I have been able to set up all my data and tables with naming them all when I do a Marco record same as I did it on office 365 its not saving any of the PQ code

    My steps are open sheet Transport click on Cell A1
    click Power Query From Table/Range Power Query opens
    Click Advanced Editor replace all code with below

    Please Login or Register  to view this content.
    Close and load to table existing worksheet =Transport!CV1 then load

    everything works

    when I try and do the same with recording Macro at the end my vba only shows

    Please Login or Register  to view this content.
    when I used office 365 it looked like below

    Any help would be great Still learning how to Code in VBA and use record a lot

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: VBA Recording Power Query not working

    I can't help you to solve this, however it may well have something to do with the code: PQ code is cammed "M" and it is not the same as VBA. I doubt, therefore, that a VBA routine can recognise it.

    Is there any real need for VBA? PQ routines can be automated. I wonder if what you want to do couldn't be achieved a different way.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    09-24-2017
    Location
    Vic Australia
    MS-Off Ver
    Office 365 Apps for enterprise
    Posts
    147

    Re: VBA Recording Power Query not working

    Good afternoon AliGW

    The main reason I went to VBA is to set up a Marco so other staff members at work would just need to click a few buttons and it would all work

    I did not know PQ routines can be automated I did a search on google and it points me to office 365 ;-(

    You help me a few months ago with pointing me to PQ which has been great learning heaps

    A different any help would be helpful

    After trying to work this out for the last few hours with setting up all the correct PQ
    I have 4 PQ codes that I like to run
    first 3 PQ get information from tables sort rename and remove unneeded columns
    the 4th one mergers everything in a set way


    P.s
    sorry what do you mean by PQ code is cammed "M"

  4. #4
    Forum Contributor
    Join Date
    09-24-2017
    Location
    Vic Australia
    MS-Off Ver
    Office 365 Apps for enterprise
    Posts
    147

    Re: VBA Recording Power Query not working

    AliGW

    I think this is a Limit on office 2013

    I just tried the same code

    On the same excel sheet tried office 365 the same way with record macro and worked

    I was reading up on https://stackoverflow.com/questions/...r-query-in-vba

    I now get what you mean by PQ code is cammed "M"

+ 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. [SOLVED] Power Pivot does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  2. Power Query and Power Pivot Table !!
    By haitham.shop in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2018, 06:15 AM
  3. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-06-2018, 05:59 AM
  4. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  5. Power Query - Parameter not working
    By vibajajo64 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2018, 01:08 AM
  6. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  7. code to refresh power query not working ..
    By Hassan1977 in forum Excel General
    Replies: 0
    Last Post: 08-31-2016, 12:31 PM

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