R
RyanH
I have confirmed that Range("B10") Interior Color Index is = 50 and the Range
I am including in the If...Then Statement is empty, but when I run this
portion of code the MsgBox does not appear, it executes the Else portion of
the If...Then, Why? Any suggestions would be greatly appreciated.
'removes all jobs on quote sheet
If Range("B10").Interior.ColorIndex = 50 And
IsEmpty(Range("C13,C5:G8,G1:H3")) = True Then
MsgBox "You don't have anything to delete on your quote sheet.",
vbCritical
Exit Sub
Else
'clears contents of customer information
Range("C13,C5:G8,G1:H3").ClearContents
'clears all quotes
For n = 10 To 200
If Cells(n, 2).Interior.ColorIndex = 50 Then
LastRow = Cells(n, 2).Row - 1
Exit For
End If
Next n
FirstRow = Range("B10").Row
Rows(FirstRow & ":" & LastRow).Delete Shift:=xlUp
End If
Thanks in Advance,
Ryan
I am including in the If...Then Statement is empty, but when I run this
portion of code the MsgBox does not appear, it executes the Else portion of
the If...Then, Why? Any suggestions would be greatly appreciated.
'removes all jobs on quote sheet
If Range("B10").Interior.ColorIndex = 50 And
IsEmpty(Range("C13,C5:G8,G1:H3")) = True Then
MsgBox "You don't have anything to delete on your quote sheet.",
vbCritical
Exit Sub
Else
'clears contents of customer information
Range("C13,C5:G8,G1:H3").ClearContents
'clears all quotes
For n = 10 To 200
If Cells(n, 2).Interior.ColorIndex = 50 Then
LastRow = Cells(n, 2).Row - 1
Exit For
End If
Next n
FirstRow = Range("B10").Row
Rows(FirstRow & ":" & LastRow).Delete Shift:=xlUp
End If
Thanks in Advance,
Ryan