VB script for error text box
Closed
Kryton1976
-
Jan 14, 2010 at 08:06 AM
tompols Posts 1273 Registration date Wednesday July 28, 2004 Status Contributor Last seen November 25, 2013 - Jan 14, 2010 at 12:29 PM
tompols Posts 1273 Registration date Wednesday July 28, 2004 Status Contributor Last seen November 25, 2013 - Jan 14, 2010 at 12:29 PM
Related:
- VB script for error text box
- Network error occurred - Guide
- Cmos checksum error - Guide
- Bios rom checksum error - Guide
- Anu script manager 7.0 free download filehippo - Windows 7 Forum
- Script file not found platform.resv ✓ - Windows 8 Forum
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 July 28, 2004
Status
Contributor
Last seen
November 25, 2013
28
Jan 14, 2010 at 12:29 PM
Jan 14, 2010 at 12:29 PM
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