IIF statement

  • Thread starter Thread starter Alex Martinez
  • Start date Start date
A

Alex Martinez

Hello,

I am wondering if there is a case statement similiar used in Visual Basic
that I can use instead of using IIf statment. Any tips will be appreciated.
Thank you.
 
Alex,

In VBA you can use a Select Case statement. In my experience, this is
not usually an alternative to using an IIf() function. Each has its
place. In other words, it depends on the context and your purpose.
Related to this question, there would also be the If...Then...Else
statement in VBA, and the Switch() function. If you could give an
example of what you are trying to achieve, someone may be able to offer
more specific advice.
 
Back
Top