VB script for error text box
Closed
Kryton1976
-
Jan 14, 2010 at 08:06 AM
tompols Posts 1325 Status Contributor - Jan 14, 2010 at 12:29 PM
tompols Posts 1325 Status Contributor - Jan 14, 2010 at 12:29 PM
Related:
- VB script for error text box
- Error network error occurred - Guide
- Cmos checksum error - Guide
- Ps3 error codes - Guide
- Bios rom checksum error - Guide
- How does a drop box work - 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
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