+ Reply to Thread
Results 1 to 7 of 7

Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    NY USA
    MS-Off Ver
    Excel 2016 and 2010
    Posts
    27

    Cool Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Hello All!

    I'm requesting help with getting a confirmation pop up message with "yes" and "cancel" button on cell value change.

    I'd like certain cell ranges (e.g. A1:D10) to confirm the user's action when editing a cell's value under the following 3 conditions.

    If a cell has empty/null value within the cell range, then no confirmation should pop up.

    3 conditions should exist.

    If a cell value goes from __ "TO" __,

    1) empty/null "TO" value (NEW ENTRY) ****** No confirmation
    2) value "TO" different value (CHANGE) **** Confirmation to change cell value?
    3) value "TO" empty/null (DELETE) ********* Confirmation to delete cell value?

    I've seen several examples of codes with popup confirmation on value change, but was not able to find one with all 3 conditions available in one code.

    I appreciate and thank you so much for your help!


    Reference to another similar thread:
    http://www.excelforum.com/excel-prog...ue-change.html

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Stick this in the worksheet module:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    12-09-2009
    Location
    NY USA
    MS-Off Ver
    Excel 2016 and 2010
    Posts
    27

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Thank you OllyXLS for the fast response. The code is awesome. All 3 conditions are satisfied

    Is there anyway to avoid VBA run-time error '13" Type mismatch, when performing the actions with multiple cells highlighted?

    1) deleting multiple cells at once.
    2) while multiple cells highlighted, enter data on selected cell.

    I'm sorry these are nitpicking for perfection, but I would love it even more with these things!

    Thanks again! Rep+
    Last edited by smk224; 11-08-2013 at 12:15 PM.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Quote Originally Posted by smk224 View Post
    Thank you OllyXLS for the fast response. The code is awesome. All 3 conditions are satisfied

    Is there anyway to avoid VBA run-time error '13" Type mismatch, when performing the actions with multiple cells highlighted?

    1) deleting multiple cells at once.
    2) while multiple cells highlighted, enter data on selected cell.

    I'm sorry these are nitpicking for perfection, but I would love it even more with these things!

    Thanks again! Rep+
    Try changing the code to:

    Please Login or Register  to view this content.
    It's a quick fix, which prevents the runtime error if multiple cells are selected, and just warns that undo is unavailable (statusbar message).

    There is probably a way to provide the undo functionality you want for multiple cell ranges, by storing original values in an array, but I'm afraid I don't really have time to work that one through today.

  5. #5
    Registered User
    Join Date
    12-09-2009
    Location
    NY USA
    MS-Off Ver
    Excel 2016 and 2010
    Posts
    27

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Thank you even if it was just a quick workaround! I'll use this.

    It's still definitely better than before.

    Thanks for taking time off from your busy schedule to help. Many blessings to you!

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Okay - try this, which should now handle multiple cell selections:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-09-2009
    Location
    NY USA
    MS-Off Ver
    Excel 2016 and 2010
    Posts
    27

    Re: Confirmation Popup Window on Cell Change & Cell Delete. (3 conditions)

    Olly that was great! The multiple selection issue is perfectly resolved! Many Cheers!

+ 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. Confirmation pop-up on cell value change
    By chrisneu in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 12-14-2017, 07:40 AM
  2. Popup input window when cell is selected
    By maneysm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 03:53 AM
  3. If cell above value popup window
    By Blue_Wings in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-01-2011, 05:02 AM
  4. Confirmation Msg Popup
    By Rage in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-07-2009, 09:51 AM
  5. [SOLVED] how do i delete a preset popup description window in excel?
    By PM in forum Excel General
    Replies: 1
    Last Post: 04-05-2006, 04:10 PM

Tags for this Thread

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