help writing a simple function/expression

  • Thread starter Thread starter lynda
  • Start date Start date
L

lynda

someone helped me write an expression in a module this
morning and when i closed the file i lost it. it was very
simple, i just don't know the format of how to rewrite it.
what i remember:
i was writing the function as so:

case is <10000
premiumsize="<10"
case is <20000
premiumsize="10 - 19"
case is <30000
premiumsize="20 - 29"
case us <40000
premiumsize="30 - 39"
etc, etc.

I have version 97. I need help writing the beginning and
the end of the function....like -
Function premiumsize (string) ...or something like that
for the beginning and
Function End ....or something like that for the end.

Do you need more information to help??

Thanks so much!!!
 
Looks like it was a Select Case statement.

Select Case YourValueHere

Case is <10000
premiumsize = "<10"

etc

End Select
 
Function PremiumSize(InputValue As Long) As String

Select Case InputValue
case is <10000
premiumsize="<10"
case is <20000
premiumsize="10 - 19"
case is <30000
premiumsize="20 - 29"
case is <40000
premiumsize="30 - 39"
case else
premiumsize = "unknown"
End Select

End Function
 
Back
Top