Still stuck up the creek with no paddle

mark curtis

Registered User.
Local time
Today, 17:23
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
 
I thing you may have to do some homework

Read up on how to use the select case

Select Case rngPrSt(i) 'The field you want to test

Case ___ 'Insert the first thing you are testing for

Do this, Do that

Case ___2 'Insert the second thing you are testing for

Do the other

Case ___3
If IsEmpty (rngPrM(i))
' if you are testing for the field to be empty or null then the syntax is
If IsNull (rngPrM & i) then

or

If (rngPrM & i) ="" then

End Select
 
Last edited:
Thanks for that mate! but not for the cricket thrashings over the past decade!!!
 
What goes around comes around. I grew up in the 70's when the West Indies were invincable
We seem to have a good coaching structure here.
Cheers
Dave
 

Users who are viewing this thread

Back
Top Bottom