Am having difficulty adding conditions to the worksheet_calculate code I am using. Assistance Appreciated
**This works. When B26 = 250 Message box appears. Click ok & you can continue.
Private Sub Worksheet_calculate()
Dim cellValue As Integer
cellValue = Range("B26").Value
If cellValue = 250 Then
MsgBox ("Cell value is " & cellValue)
End If
End Sub
What I am trying to accomplish:
1) is to have the message box pop up at the following values. 250, 500, 750, 1000, 1250, 1500, 1750 & 2000.
2) When the user clicks the OK button, (if Value is 250)Select Sheet 2 Range A:2:A10 & Print this selection. (if value is 500)Select Sheet 2 Range B2:B10 if value is 500 & Print this selection...... if value 750 select & print... etc etc
**This works. When B26 = 250 Message box appears. Click ok & you can continue.
Private Sub Worksheet_calculate()
Dim cellValue As Integer
cellValue = Range("B26").Value
If cellValue = 250 Then
MsgBox ("Cell value is " & cellValue)
End If
End Sub
What I am trying to accomplish:
1) is to have the message box pop up at the following values. 250, 500, 750, 1000, 1250, 1500, 1750 & 2000.
2) When the user clicks the OK button, (if Value is 250)Select Sheet 2 Range A:2:A10 & Print this selection. (if value is 500)Select Sheet 2 Range B2:B10 if value is 500 & Print this selection...... if value 750 select & print... etc etc