+ Reply to Thread
Results 1 to 2 of 2

VBA - Refresh Pivot Table Data in Locked Worksheet

  1. #1
    Registered User
    Join Date
    05-14-2018
    Location
    South Windsor, CT
    MS-Off Ver
    2016
    Posts
    4

    VBA - Refresh Pivot Table Data in Locked Worksheet

    Hello all. I have a worksheet which has several pivot tables on it and I have inserted a button to refresh all the data. It works great for the others in our office who are not familiar with Excel but one person almost lost the pivot table on me so I tried locking the worksheet. When I do, the button no longer refreshes (a little searching online indicates that the refresh data option is disabled when locked).

    So what I'm trying to do with it now is rewrite the code to take the following steps

    1.) Unlock worksheet
    2.) Refresh all data
    3.) Relock worksheet

    As I am not well versed in VBA, I was hoping someone on here has already come across this and has a fix.

    Thanks in advance!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA - Refresh Pivot Table Data in Locked Worksheet

    Hi,
    Recording a macro should give you the code required for that...
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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. Automatic refresh pivot table when worksheet value changes
    By gishena in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-03-2016, 10:49 AM
  2. Replies: 0
    Last Post: 08-14-2013, 06:31 AM
  3. Excel template -- allow refresh data but maintain worksheet protection/locked cells
    By leiaduva in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2012, 09:53 AM
  4. Refresh pivot table on a protected worksheet
    By DougieL in forum Excel General
    Replies: 2
    Last Post: 08-09-2012, 02:10 AM
  5. Button to refresh a pivot table in Worksheet
    By sqledge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2011, 03:05 AM
  6. Refresh Pivot in Locked Sheet?
    By Dark_Templar in forum Excel General
    Replies: 1
    Last Post: 06-05-2006, 01:37 PM
  7. Refresh Pivot Table from other worksheet cell entry
    By ShaneS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2005, 11:05 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