Hello,
I have a workbook that I use to choose equipment and calculate prices, and other users also uses this workbook, so it needs to be as user friendly as possible.
I have then created a code that prompts a messagebox if the value in cell B10 exceeds 1.
The same is done for cell B10.
The messageboxes tells the user that two of the equipment type has been chosen, and that they need to decide on a amount of a cost further down the page. The user can then type a amount into the messagebox and press OK, and the workbook uses that value in another cell.
However, I then have a reset macrobutton that I use to reset all choices made in the workbook, and when that is pressed the value in cell B10 and B13 in set to nothing ("").
The messageboxes then prompts, but that is NOT what I want. I ONLY want the messageboxes to prompt if the values in cell B10 and B13 exceeds 1.
Please see code below.
I have a workbook that I use to choose equipment and calculate prices, and other users also uses this workbook, so it needs to be as user friendly as possible.
I have then created a code that prompts a messagebox if the value in cell B10 exceeds 1.
The same is done for cell B10.
The messageboxes tells the user that two of the equipment type has been chosen, and that they need to decide on a amount of a cost further down the page. The user can then type a amount into the messagebox and press OK, and the workbook uses that value in another cell.
However, I then have a reset macrobutton that I use to reset all choices made in the workbook, and when that is pressed the value in cell B10 and B13 in set to nothing ("").
The messageboxes then prompts, but that is NOT what I want. I ONLY want the messageboxes to prompt if the values in cell B10 and B13 exceeds 1.
Please see code below.
Code:
If Target.Address = Range("B10").Address Then
If Target.Value = "1" Then
Worksheets("Choose sheet").Range("B30").Value = "1"
Exit Sub
End If
description = InputBox("More than 1 module has been chosen. Please choose quantity of Miscellaneous costs.")
If description = "" Then Exit Sub
Worksheets("Choose sheet").Range("B30").Value = description
End If
If Target.Address = Range("B13").Address Then
If Target.Value = "1" Then
Worksheets("Choose sheet").Range("B31").Value = "1"
Exit Sub
End If
description = InputBox("More than 1 module has been chosen. Please choose quantity of Miscellaneous costs.")
If description = "" Then Exit Sub
Worksheets("Choose sheet").Range("B31").Value = description
End If