I would like to run the below code only when there is no "x"'s in the following ranges:
ActiveSheet.Range("C16:C633")
otherwise
Call Inclusion
ActiveSheet.Range("C16:C633")
Code:
Sub msgReset()
Dim iRet As Integer
Dim strPrompt As String
Dim strTitle As String
Dim num As Integer
Dim var2 As String
var2 = "x"
Sheets("Pricing").Select
num = Application.CountIf(ActiveSheet.Range("C16:C633"), var2)
' Prompt
strPrompt = num & " 'excluded' services will not be reset, is this OK?"
' Dialog's Title
strTitle = ".:: Reset Increase/Decrease to 100% ::."
'Display MessageBox
iRet = MsgBox(strPrompt, vbYesNo, strTitle)
' Check pressed button
If iRet = vbNo Then
Exit Sub
Else
Call Inclusion
End If
End Sub
otherwise
Call Inclusion