LaurenAshworth95
New Member
- Joined
- Jan 17, 2023
- Messages
- 1
- Office Version
- 2021
- Platform
- Windows
Good afternoon all,
I have a workbook and in one of the sheets I need to run a code that will give me a pop up when the value in a box changes and is still >0. I should mention that the box I need to monitor is a formula so I am monitoring the formulas value rather than the formula itself. I have the below which works however when just one formula value changes it gives me a pop up per value. So I change one formula value and get 7 pop ups. I can attach the spreadsheet if needed. Here is the code I am using:
Private Sub Worksheet_Calculate()
Dim r As Range
For Each r In Range("AF4:AF15678")
If r.Value > 0 Then
MsgBox "Please note there are outstanding kits to be returned on this order. Please confirm any remaining returns with customer or BD representative"
End If
Next r
End Sub
Thank you for any help you can provide.
I have a workbook and in one of the sheets I need to run a code that will give me a pop up when the value in a box changes and is still >0. I should mention that the box I need to monitor is a formula so I am monitoring the formulas value rather than the formula itself. I have the below which works however when just one formula value changes it gives me a pop up per value. So I change one formula value and get 7 pop ups. I can attach the spreadsheet if needed. Here is the code I am using:
Private Sub Worksheet_Calculate()
Dim r As Range
For Each r In Range("AF4:AF15678")
If r.Value > 0 Then
MsgBox "Please note there are outstanding kits to be returned on this order. Please confirm any remaining returns with customer or BD representative"
End If
Next r
End Sub
Thank you for any help you can provide.