+ Reply to Thread
Results 1 to 10 of 10

Cell change event

  1. #1
    Registered User
    Join Date
    02-09-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Cell change event

    Howdy all!

    Lets say I have: =SUM(A1:A10) in cell A11 and the given range has some random numbers, now when a user changes any of the cells within the range A1:A10 then A11 will have a new value, how do i detect the change in A11? it changes due to a formula not a physical change in that cell by the user. the Worksheet_Change does not work.

    another question. A11 = SUM(A1:A10), how via VBA do i get the result of that formula ? lets say the result is 23 i want to display a message box saying "23". the value property does not seem to work. I'm using office 2010

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,826

    Re: Cell change event

    Well, you can actually:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-09-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Cell change event

    Thanks but its does nothing. A11 changes when i change A4 for example. But the vba script doesn't notice that A11 had changed

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,826

    Re: Cell change event

    Where have you put the code?

  5. #5
    Registered User
    Join Date
    02-09-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Cell change event

    Sheet1 , This is also where the calculations, ect.. are made from which i'm working on.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,644

    Re: Cell change event

    Use Calculate event instead of Change event.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,644

    Re: Cell change event

    Quote Originally Posted by sgroves View Post
    another question. A11 = SUM(A1:A10), how via VBA do i get the result of that formula ? lets say the result is 23 i want to display a message box saying "23". the value property does not seem to work. I'm using office 2010
    Try
    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,826

    Re: Cell change event

    Are macros enabled? Is event handling enabled?

    In the Immediate Window, type ?Application.EnableEvents and press Enter. Is it True or False?

    @jindon: you don't need to use the Calculate event; the Change event does work

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,644

    Re: Cell change event

    TMS

    Ah, I didn't see your code...
    It will be OK in this particular case, but if the Sum range is in other sheet...

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,826

    Re: Cell change event

    ... but if the Sum range is in other sheet...
    Ooh, I must try that It's still got precedents

+ 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. Worksheet Change event ignore change event
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2011, 12:29 PM
  2. Change Event doesn't change until I return to the Target Cell
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-11-2007, 05:20 PM
  3. 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
  4. 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
  5. [SOLVED] cell value change event
    By Mangesh Yadav in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 07:05 PM
  6. cell value change event
    By alinasir in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  7. [SOLVED] cell value change event
    By alinasir in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  8. [SOLVED] cell value change event
    By alinasir in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03: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