Design Form :- 1. Select one command button on form.
Private Sub Command1_Click() Dim i As Integer i =10 Do While i>=1 Print i i = i-1 Loop End Sub
Now double click on command button then type that code :-
Private Sub Command1_Click()
Dim n As Integer, a As Integer, k As Integer
n =inputbox("enter the number");
while(n>0) a=n mod 10 k=k+1 n=int(n/10) wend print k