I use this form from time to time instead of using complex "If...End If" statements. Is it inefficient? Bad style? The path to eternal damnation?
It subtly distubs me, but I don't know why. Opinions?
PSC
[—] CCNP (R&S/Wireless) [•] CCSP [•] MCITP: Enterprise Admin [•] MCSE [—]
Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
Code:
Dim strMyString
Const strOne = "String 1"
Const strTwo = "String 2"
Const strThree = "String 3"
strMyString = "Some string data from another process/function/sub/etc"
[blue]Select Case True[/blue]
Case (InStr(strMyString, strOne) > 0), (InStr(strMyString, strTwo) > 0)
' Do stuff
Case (InStr(strMyString, strThree) > 0)
' Do other stuff
End Select
It subtly distubs me, but I don't know why. Opinions?
PSC
[—] CCNP (R&S/Wireless) [•] CCSP [•] MCITP: Enterprise Admin [•] MCSE [—]
Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers