To find the length of a number
Sample Code :
Private Sub Command1_Click()
Label2.Caption = "LENGTH IS : "
Select Case Val(Text1.Text)
Case 0 To 9:
Label2.Caption = Label2.Caption + "1"
Case 10 To 99:
Label2.Caption = Label2.Caption + "2"
Case 100 To 999:
Label2.Caption = Label2.Caption + "3"
Case 1000 To 9999:
Label2.Caption = Label2.Caption + "4"
Case 10000 To 99999:
Label2.Caption = Label2.Caption + "5"
Case 100000 To 999999:
Label2.Caption = Label2.Caption + "6"
Case Is > 999999:
Label2.Caption = Label2.Caption + "6 Above"
End Select
End Sub
Full Code :
Output(Select Case.exe)
Full code(Select Case.docx)
Full project(Select Case.zip)
*Note Full project requre Visual Basic 6.0