18 October 2008 ~ Comments Off

Select Case in VB

For the few still wondering how to do a Select case in VB here you go! Below is your basic select case in a function returning a true or false boolean.

Public Function CheckStatus(ByVal Status As Boolean) As Boolean
        Select Case Status
            Case True
                Return False
            Case Else
                Return True
        End Select
End Function

The function is checking for a true or false then returning it back out, based on the case.

Tags:

Comments are closed.