Results 1 to 4 of 4

Event trigger via change in row height

Threaded View

  1. #1
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Event trigger via change in row height

    see attached file
    As you can see from the 2 images below, the value in cell E1 changes from 37.8 to zero when my data filter is applied.
    The formula in E1 is simply = A2
    So the value in A2 changes when I apply a filter to my data and it returns to the original value when the filter is removed.
    (and E1 merely reflects that)
    Cell E1 is incidental here - it's only there to display the value in A2 when the row is filtered.
    The value in B2 is the value of A2 frozen at a point in time (created with copy & paste values)

    FilteredUnFiltered.jpg

    The value in A2 reflects the row's current height

    I require the value in B2 to always reflect the current value of A2 in its unfiltered state, whether the row is filtered or not
    And what is more important - I need to access the correct current value when the row itself is filtered
    When the user changes a row's height, the historic value in B2 is no longer the one I want - it needs updating at that point.

    My quandry:
    Due to it being an automated change in the value in cell A2, this VBA is not triggered
    Private Sub Worksheet_Change(ByVal Target As Range)
       If Not Intersect(Target, Range("A2")) Is Nothing Then MsgBox "I have changed"
    End Sub
    And (in any case) Target.value would be the new value (=0) after filtering which is the very value I do not want!


    So the puzzle is how to update cells in column B automatically when
    the user either increases or decreases the row height

    without it also being triggered at the point when the row is hidden by filter
    (multiple rows may be altered at the same time)

    thank you
    Attached Files Attached Files
    Last edited by kev_; 04-23-2017 at 08:02 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Worksheet Change Event Wrongly Trigger
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2014, 11:00 PM
  2. [SOLVED] VBA to trigger event change
    By jrholden in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-26-2014, 11:34 AM
  3. [SOLVED] Trigger Change Event
    By alienware in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-27-2012, 07:25 AM
  4. Select Box Change Event Trigger
    By excelsupportforum in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2012, 12:45 PM
  5. ComboBox within Frame - how to trigger a change event
    By Barbados in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2011, 03:19 AM
  6. Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM
  7. Worksheet Change Event-change event to trigger
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2005, 06:05 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