+ Reply to Thread
Results 1 to 4 of 4

VBA for refresh tables based on PowerQuery in protect worksheet

  1. #1
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    VBA for refresh tables based on PowerQuery in protect worksheet

    Hi,

    in the "Data" sheet, I have 2 tables that I load into PowerQuery and save as tables in another sheet named "Query". I would like to have a macro that unlocks the "Query" sheet with the password "a", refreshes the tables in this sheet and re-secures the "Query" sheet again.

    Thank you for all the help.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: VBA for refresh tables based on PowerQuery in protect worksheet

    Please Login or Register  to view this content.
    Last edited by alansidman; 10-07-2019 at 06:14 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Re: VBA for refresh tables based on PowerQuery in protect worksheet

    I wrote the same macro, but I get a warning: "The cell or chart you're trying to change is in a protected sheet. To make change, unprotect sheet. You might be required to enter a password."

    I solved the whole problem by hiding the sheet in VBA. Thanks for your solution.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: VBA for refresh tables based on PowerQuery in protect worksheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Macro for connecting tables to PowerQuery
    By asmitajali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2019, 11:03 AM
  2. Avoid PowerQuery refresh from deleting empty columns
    By Barslund in forum Excel General
    Replies: 10
    Last Post: 01-10-2018, 04:19 AM
  3. Refreshing PowerQuery Tables on a Protected Sheet
    By boxahoy in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-20-2017, 07:26 AM
  4. Refresh pivot tables on one worksheet, not all
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2013, 08:48 PM
  5. Code for unprotecting refresh protect based on system time
    By hootiebsc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2013, 10:57 AM
  6. Code for unprotecting refresh protect based on system time
    By hootiebsc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2013, 04:12 PM
  7. Replies: 1
    Last Post: 09-25-2012, 01:30 AM

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