mark curtis
Registered User.
- Local time
- Today, 20:43
- Joined
- Oct 9, 2000
- Messages
- 457
Dear all,
Using code like the sub section below I am trying to check the content of the rngVariable against strCriteria but my code will just not pick up any of the strCriteria. What am I doing wrong???
strCriteria = "In
('""','0','<Mandatory>','<MANDATORY>','Missing','tbc','tba','n/a','missing')"
strComments = ""
For i = 1 To intLastRow - 1
Select Case rngPrSt(i)
Case Is = "Open", "Complete"
'Project Manager
If IsEmpty (rngPrM(i)) Or rngPrM(i) = strCriteria Then
rngPrM(i).Interior.ColorIndex = 6
strComments = "Project Manager, "
End If
'Start Date
If IsEmpty(rngPrSD(i)) Or rngPrSD(i) = strCriteria Then
rngPrSD(i).Interior.ColorIndex = 6
strComments = strComments & "Start Date,"
End If
''Check that End Date is present and is also greater than current date
If IsEmpty(rngPrED(i)) Or rngPrED(i) < Date - 1 Or
rngPrED(i) = strCriteria) Then
rngPrED(i).Interior.ColorIndex = 6
rngPrSt(i).Interior.ColorIndex = 6
strComments = strComments & "End Date,"
End If
Using code like the sub section below I am trying to check the content of the rngVariable against strCriteria but my code will just not pick up any of the strCriteria. What am I doing wrong???
strCriteria = "In
('""','0','<Mandatory>','<MANDATORY>','Missing','tbc','tba','n/a','missing')"
strComments = ""
For i = 1 To intLastRow - 1
Select Case rngPrSt(i)
Case Is = "Open", "Complete"
'Project Manager
If IsEmpty (rngPrM(i)) Or rngPrM(i) = strCriteria Then
rngPrM(i).Interior.ColorIndex = 6
strComments = "Project Manager, "
End If
'Start Date
If IsEmpty(rngPrSD(i)) Or rngPrSD(i) = strCriteria Then
rngPrSD(i).Interior.ColorIndex = 6
strComments = strComments & "Start Date,"
End If
''Check that End Date is present and is also greater than current date
If IsEmpty(rngPrED(i)) Or rngPrED(i) < Date - 1 Or
rngPrED(i) = strCriteria) Then
rngPrED(i).Interior.ColorIndex = 6
rngPrSt(i).Interior.ColorIndex = 6
strComments = strComments & "End Date,"
End If