Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,533
- Office Version
- 365
- 2016
- Platform
- Windows
Consider this code:
In my example,
cntofreviewed = 26
wshmain.range("D3") = 45
If I've written this code correctly, the elseif statementin blue should trigger a true situation. It's not. It's passed over.
Is there something I'm missing here?
Rich (BB code):
cntofreviewed = Application.CountIf(wshcore.Range("Q:Q"), 1)
If cntofreviewed = 0 Then 'nothing has been reviewed and submitted
MsgBox "Of the " & wshmain.Range("D3") & ", 0 records have been reviewed and submitted." & Chr(13) & "Please review, edit and submit the records before reconciling.", 48, "RECONCILIATION NOT APPLICABLE"
Exit Sub
ElseIf cntofreview > 1 And cntofreview < wshmain.Range("D3") Then
pro1 = MsgBox("There are " & wshmain.Range("D4") & " records not yet reviewed and submitted." & Chr(13) & "Do you wish to continue editing?", 36, "RECONCILIATION")
If pro1 = vbYes Then
Exit Sub
End If
End If
In my example,
cntofreviewed = 26
wshmain.range("D3") = 45
If I've written this code correctly, the elseif statementin blue should trigger a true situation. It's not. It's passed over.
Is there something I'm missing here?