+ Reply to Thread
Results 1 to 3 of 3

Refresh Data Table And Not Trigger Worksheet_Change

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Refresh Data Table And Not Trigger Worksheet_Change

    Hi,

    I have a data table that is connected to a sharepoint list. I need to find a way to refresh the data table without triggering the Worksheet_Change event.

    My Worksheet_Change change event monitors if a cell has been edited in the table and marks that line with an "*". But when I refresh my table, the Worksheet_Change considers all the lines changed and marks every single line with an "*".

    Any ideas?

  2. #2
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: Refresh Data Table And Not Trigger Worksheet_Change

    You can set Application.EnableEvents = False while you do the refresh and then set it true after the fact

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Refresh Data Table And Not Trigger Worksheet_Change

    Yep, what you will want to do is

    - Create a global variable that will hold a state "on/off" or "true/false" etc.
    - Create a sub to refresh your pivot data table, at the beginning of your sub set the global variable to "On", refresh your data tables and then set the global variable to "Off"
    - In your on change event add a check "IF global_variable = "Off" Then", so that the on change event code will not execute when your data table refresh is occuring

+ 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] Event code Worksheet_Change- trigger from another worksheet
    By sheripres in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2018, 10:32 AM
  2. Paste doesnt trigger Worksheet_change
    By estradation in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 10-04-2016, 11:19 PM
  3. [SOLVED] Worksheet_Change does not trigger macro?
    By lexusap in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2013, 07:18 PM
  4. [SOLVED] Cannot trigger macro with Worksheet_Change(ByVal Target As Range)
    By Leo2004a in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-13-2013, 03:01 PM
  5. pasting doesnt trigger worksheet_change on excel 98?
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-02-2008, 07:38 AM
  6. Trigger worksheet_change
    By helmekki in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2005, 09:02 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