I was wondering if the following is the simplest structure for the condition, or if there's a more concise way to code it.
The idea is to reject any value in Unit that does NOT begin with YR, MO, or DY.
I have not yet had occasion to use Choose or Switch, but they don't seen appropriate...
At one point I probably would have coded this as either a multi-clause IF, or a series of IFs, or a series of INSTRs...
Have I stumbled upon the most concise code?
The idea is to reject any value in Unit that does NOT begin with YR, MO, or DY.
Code:
Select Case UCase$(Left$(Unit, 2)) Case "YR","MO","DY" Case Else Exit Function End Select ' 'processing for the YR, MO, DY values
At one point I probably would have coded this as either a multi-clause IF, or a series of IFs, or a series of INSTRs...
Have I stumbled upon the most concise code?
Comment