When writing a query, I can use an in statement to check for many conditions of a variable, such as Not In ("96833","3228256"). Can I do the same thing in VBA with an if statement or something else?
Such as:
Public Function CheckProject() As String
If (ProjectID not in "011082", "011100","011105","011110", "011118","011123") Then
ProjectID = ""
Else
ProjectID = ProjectID
End If
End Function
This syntax doesn't work, any help would be appreciated. Thank you!
Such as:
Public Function CheckProject() As String
If (ProjectID not in "011082", "011100","011105","011110", "011118","011123") Then
ProjectID = ""
Else
ProjectID = ProjectID
End If
End Function
This syntax doesn't work, any help would be appreciated. Thank you!