Click to See Complete Forum and Search --> : If, Else, End


ldoodle
04-19-2006, 09:19 AM
Hi there,

How would I convert the following code to see they are not a member of one of the specified groups? I've tried changing to If Not but it don't work.

If Group.cn = "WS Key Stage 3" or Group.cn = "WS Key Stage 4" or Group.cn = "WS Key Stage 5" or Group.cn = "WS Associate Staff" or Group.cn = "WS Teaching Staff" Then
intBlockType = "1"
End If

Thanks/...

lmf232s
04-19-2006, 10:26 AM
Something like this maybe.


If Group.cn <> "WS Key Stage 3" or Group.cn <> "WS Key Stage 4" or Group.cn <> "WS Key Stage 5" or Group.cn <> "WS Associate Staff" or Group.cn <> "WS Teaching Staff" Then
intBlockType = "1"
End If

zingmatter
04-19-2006, 11:42 AM
This should work:

If Not (Group.cn = "WS Key Stage 3" or Group.cn = "WS Key Stage 4" or Group.cn = "WS Key Stage 5" or Group.cn = "WS Associate Staff" or Group.cn = "WS Teaching Staff") Then
intBlockType = "1"
End If

Ubik
04-19-2006, 07:13 PM
Select case
case "WS Key Stage 3"
'nope
case "WS Key Stage 4"
'nope
case "WS Key Stage 5"
'nope
case "WS Associate Staff"
'nope
case "WS Teaching Staff"
'nope
default
intBlockType = "1"
End Select