L
lunker55
I currently have the code:
Private Sub Worksheet_Calculate()
Dim cell As Range
Dim Rng As Range
Set Rng = Range("D3
1000")
For Each cell In Rng
If cell.Value >= 96 Then
MsgBox "You have exceeded the daily limit!"
End If
Next
End Sub
And want a message box where the person has the option to override the cell
value.
The following code was in the help section. Can I somehow add this into my
current macro?
Dim Msg, Style, Title, MyString
Msg = "Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "Exceeded daily limit"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
Else
MyString = "No"
End
Joe
Private Sub Worksheet_Calculate()
Dim cell As Range
Dim Rng As Range
Set Rng = Range("D3

For Each cell In Rng
If cell.Value >= 96 Then
MsgBox "You have exceeded the daily limit!"
End If
Next
End Sub
And want a message box where the person has the option to override the cell
value.
The following code was in the help section. Can I somehow add this into my
current macro?
Dim Msg, Style, Title, MyString
Msg = "Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "Exceeded daily limit"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
Else
MyString = "No"
End
Joe