+ Reply to Thread
Results 1 to 6 of 6

Check if there is a change in cell

  1. #1
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    112

    Check if there is a change in cell

    Good day Excel Gurus,

    I have the working VBA code below but I need some revision. The code below checks every cell if there is a change. Example, If I made change on cell “D9”, it will ask “Do you want to save changes…?” and also same with “D10”, “D11”, and so on.

    What revision I want is when you reach “D42”, or when I exit on the loop that the only time it will check if there are changes made on the sheet.

    Any help would be appreciated.

    Thank you.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,401

    Re: Check if there is a change in cell

    .
    You want to be notified if a change occurs ANYWHERE on the sheet ?

  3. #3
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Check if there is a change in cell

    Quote Originally Posted by Logit View Post
    .
    You want to be notified if a change occurs ANYWHERE on the sheet ?
    Yes sir. If there are more than 1 changes, I would like the notification once only NOT every time I change the value of each cell.

    Thank you for your prompt response.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,401

    Re: Check if there is a change in cell

    .
    Hmmm .... help me understand.

    At first I was thinking you wanted to create a log on another sheet that would list all the changes someone might make to your workbook.

    I am now thinking you want to be asked if the changes should be SAVED ?

    If that is correct, rather than using the Worksheet_Change(ByVal Target As Range) event ... perhaps asking when the workbook closes ?


    Maybe a more complete description / explanation of your work process .... goal ... is in order ?

  5. #5
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Check if there is a change in cell

    Sorry for the confusion...

    Well, theoretically the workbook is being save. There are 2 Macro, when there are changes, you have the option to save it, “Sub UpdateLogRecord()”, If you don’t want to save it, It will just clear the sheet “Sub ClearDataEntry()”, If it is cleared, it will not be stored when you save the workbook.

    Thank you.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,401

    Re: Check if there is a change in cell

    .
    Gotcha !

    There are several things you will need to do to accomplish your goal.

    In the ThisWorkbook module, you can place this macro :

    Please Login or Register  to view this content.
    The SaveOrNotMacro (or any other name you like) is the macro you will create in a Regular Module. This macro will give the user the opportunity to
    save or not save the changes made .... when they close the workbook.

    The macro will have similar logic from your posted macro :

    Please Login or Register  to view this content.
    I haven't tested the above macro here. There may be some required changes.
    Last edited by Logit; 08-27-2020 at 06:13 PM.

+ 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. check if cell to the right is empty and then change formula
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 09-14-2015, 10:49 AM
  2. Check boxes that delete other check boxes and change the color of another cell.
    By nhamhamilton in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-29-2014, 02:40 PM
  3. [SOLVED] Check dates in column and change cell color
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2013, 06:24 PM
  4. [SOLVED] Change linked cell in check box
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2012, 03:12 AM
  5. Check & Change Cell contents after entry
    By FRIEL in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-16-2011, 10:25 AM
  6. Replies: 2
    Last Post: 07-03-2009, 03:24 PM
  7. [SOLVED] How do I change the size of a check box to fit cell?
    By MTE in forum Excel General
    Replies: 0
    Last Post: 04-27-2006, 11:10 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