Public Function GetOrdinal(Number As String) As String
If Number = "11" Or Number = "13" Then
GetOrdinal = Number & "th"
ElseIf Number = "1" Then
GetOrdinal = Number & "st"
ElseIf Number = "2" Then
GetOrdinal = Number & "nd"
ElseIf Number = "3" Then
GetOrdinal = Number & "rd"
Else: GetOrdinal = Number & "th"
End If
End Function
Tuesday, August 6, 2013
Convert Number To Ordinal Number Format In Visual Basic 6
Home
»
How To
,
Programming
,
VB
,
VB6
,
Visual Basic
»
Convert Number To Ordinal Number Format In Visual Basic 6