+ Reply to Thread
Results 1 to 9 of 9

VBA code to throw a pompt when user modifies data

  1. #1
    Registered User
    Join Date
    06-01-2016
    Location
    Singapore
    MS-Off Ver
    13
    Posts
    55

    VBA code to throw a pompt when user modifies data

    Hello,

    I am looking for VBA code that will prompt the user to click on "Calculate button" only if modifies data and not otherwise.

    Its a protected workbook with VBA. I have a drop down in B18 and D20. I want to throw a prompt only if user changes the drop down value only in B18 and D20.

    If he modifies data on any other cell or if he doesnt change the any value "No prompt required".

    Please help me with VBA code on this...

  2. #2
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: VBA code to throw a pompt when user modifies data

    This should do it…. It need to be placed in the vba for the sheet you want it to run on

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-01-2016
    Location
    Singapore
    MS-Off Ver
    13
    Posts
    55

    Re: VBA code to throw a pompt when user modifies data

    Hi,

    I am afraid that dint help.

    1. Its prompting for password even when I change the values in other drop down.
    2. When I click on "Ok" on the prompt its not calculating. So, ideally its not clicking on "Calculate button"

    Fyi, its a form button and name on the button is "Calculate" . Hope it helps

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,794

    Re: VBA code to throw a pompt when user modifies data

    will prompt the user to click on "Calculate button" only
    and

    So, ideally its not clicking on "Calculate button"
    ???? So who should click the calculating button, the user or the macro?

    Alf

  5. #5
    Registered User
    Join Date
    07-21-2015
    Location
    Earth
    MS-Off Ver
    2013
    Posts
    28

    Re: VBA code to throw a pompt when user modifies data

    Here you are!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-01-2016
    Location
    Singapore
    MS-Off Ver
    13
    Posts
    55

    Re: VBA code to throw a pompt when user modifies data

    I want macro to click on calculate button, if possible.

    Basically, when user gets a prompt he should get 2 options "ok" and "cancel". When he selects "Ok" , it should automatically click on calculate button.

    Also, most important thing is. It should prompt user when he changes value in drop down any other cell apart from B18 and D20.

    Note: On my tab, I have 5 drop down list. So I want to throw a prompt only when he changes value on B18 and D20.

  7. #7
    Registered User
    Join Date
    07-21-2015
    Location
    Earth
    MS-Off Ver
    2013
    Posts
    28

    Re: VBA code to throw a pompt when user modifies data

    So what you want to do is:
    If user changes ANYTHING in cell B18:D20, an "Yes/No" prompt will come up.
    If he clicks no, then do nothing.
    If he clicks Yes, then do something right??
    Last edited by gaixixon; 08-26-2016 at 01:04 AM.

  8. #8
    Registered User
    Join Date
    06-01-2016
    Location
    Singapore
    MS-Off Ver
    13
    Posts
    55

    Re: VBA code to throw a pompt when user modifies data

    @gaixixon. Exactly thats true!! One thing you missed is...if user makes changes on any other cell apart from B18 and D20, it should not trigger the prompt.

  9. #9
    Registered User
    Join Date
    07-21-2015
    Location
    Earth
    MS-Off Ver
    2013
    Posts
    28

    Re: VBA code to throw a pompt when user modifies data

    Got what ya mean.. Sorry I uploaded wrong file.. Here you are.
    You need to work on the code yourself to fit your need.
    Attached Files Attached Files

+ 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] Macro that saves data in new work sheet and modifies the new sheet
    By bouncingbudha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-23-2015, 11:22 PM
  2. Throw selective data sheet 3 , formula not macro
    By makinmomb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-08-2014, 02:25 AM
  3. Replies: 1
    Last Post: 04-11-2013, 03:15 PM
  4. Help with re-working macro code to 'throw out' duplicate values.
    By pwyller in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-14-2012, 01:30 PM
  5. Data validation formula modifies itself
    By j.a.mcguire in forum Excel General
    Replies: 3
    Last Post: 07-08-2010, 02:47 PM
  6. Set print area with code - about to throw PC through the window!
    By weaholt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2005, 10:05 AM

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