VB script for error text box
Closed
Kryton1976
-
14 Jan 2010 à 08:06
tompols Posts 1273 Registration date Wednesday 28 July 2004 Status Contributor Last seen 25 November 2013 - 14 Jan 2010 à 12:29
tompols Posts 1273 Registration date Wednesday 28 July 2004 Status Contributor Last seen 25 November 2013 - 14 Jan 2010 à 12:29
Related:
- VB script for error text box
- Error network error occurred - Guide
- Cmos checksum error - Guide
- Setting up a box account - Guide
- Media box apk - Download - Video recording and streaming
- Error 491 play store - Guide
2 responses
Sorry,
Syntax for one cell i have is
Private Sub Worksheet_Calculate()
If Range("g24").Value < 1 Then MsgBox "No cover for this shift?!!", 48, "Warning...Warning..."
End Sub
but i want to look at the range g24-gh24
TVM
Syntax for one cell i have is
Private Sub Worksheet_Calculate()
If Range("g24").Value < 1 Then MsgBox "No cover for this shift?!!", 48, "Warning...Warning..."
End Sub
but i want to look at the range g24-gh24
TVM
tompols
Posts
1273
Registration date
Wednesday 28 July 2004
Status
Contributor
Last seen
25 November 2013
28
14 Jan 2010 à 12:29
14 Jan 2010 à 12:29
Hello,
try this, just adapt the Range("G24:H24") if needed ;)
try this, just adapt the Range("G24:H24") if needed ;)
Private Sub Worksheet_Calculate()
Dim cpt As Integer
cpt = 0 'used to count "0" values as you don't want to display 2 messages if both cells are 0s....
For Each c In Range("G24:H24")
If c.Value = 0 Then cpt = cpt + 1
Next c
If cpt > 0 Then MsgBox "No cover for this shift?!!", 48, "Warning...Warning..."
End Sub