Undo User form Submissions for specific cells

  • Good day guys

    Happy to be here :)

    I posted this same question on a different forum but unfortunately did not get sufficient help to resolve the issue.

    My experience with VBA is still very limited and would appreciate any assistance.

    The project I have been working on basically works like this:

    - The user double clicks on any cell within a checkboard layout.

    - This opens up a form with a number of options, such as Conditions, Performance, Clear Cell & Clear sheet.

    - Clicking on Performance opens up another form (form3) with a large number of tick box options. Each of these options is linked to a certain rating and the chosen options add up to a final Performance rating out of a 100.

    - Ticking boxes and submitting the form then also adds the value 1 to a Month End datasheet under the name of the ticked parameter.

    My problem comes in when using the "Clear Cell" option. This function on form1 effectively clears any formatting and values that were placed in that specific cell due to the chosen Performance tick boxes and the final rating value.

    The issue is: How do I get the "Clear Cell" button to also undo the + 1 value added under each specific tick under Month End data?

    I can't simply subtract 1 from every box under Month End, as other boxes may have been ticked on the checkboard layout.

    Only the values added due to the Performance tick boxes marked for that specific cell must be undone.

    Please assist.

    Please find attached the code for the submit button of Form3 (Performance) and the current "Clear Cell" code below it.

    The code at the bottom of the above-written code adds the value 1 to the specific month end cell.

    The above is the current code for the "Clear Cell" button on form1. As you can see, only code for other features is currently present and nothing to solve the issue stated above.

    Simply undoing form3's input into month-end for a specific cell would have been the dream.

    Any help would be appreciated.

    Thanks in advance.

    Link to other thread: https://www.excelforum.com/exc…bmission.html#post5460158

    Kind Regards

  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post

    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.

    How to use code tags

    Note: no apostrophe in the tags, just used for demonstration here.


    your code goes between these tags


    Or, just highlight all of the code and press the <> in the post menu above button to add the code tags.


  • Hi Roy

    Thank you very much. I will upload in the correct way going forward. :)

    Please find attached an example workbook I created.

    This is used to emphasise the specific problem I have.

    The Clear Cell button must subtract (undo) the inputs made into Month End using form3 for each specific cell.

    I added a green colour to a completed cell just for reference.

    Any help would be appreciated.


    Kind Regards

  • I have no idea what you are trying to do.

    Your userforms seem pointless to me. They only work on the ActiveCell so you may as well simply tight lick on that cell to change the colour.

    The forms won't save any time, in fact they will slow things down. You can use the form on the activecell, wherever that cell happens to be. To do anything else you need to close the form, select another cell then open the form.

  • Hi Roy

    Thanks for the reply.

    I think you are misunderstanding the problem.

    The file I uploaded above is not my actual program but an example to just illustrate the specific issue I have.

    I only added the colours to reference which cell has been used and must be used with "Clear Cell".

    My actual program has a large amount of tick boxes under the user form. Each of these is linked to a specific value, that gives an end result in the form of a Performance rating out of a 100.

    My issue is the Month-end data.

    As each tick box within the form is linked to a cell in Month End, it adds a 1 to the ticked option.

    Each Active Cell that ticks the same options add up that specific cell in Month end.

    My issue comes in when having to use the "Clear Cell" option. I need this button to ONLY undo the values that were added to Month-end from a specific active cell.

    Any further help would be appreciated.

    Thank you. :)

    Kind Regards

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!