Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Friday, May 27, 2011

VB-9 : Print name 10 times(For-Next Loop)


Refer Print "Hello" 10 times(Do-While) also.

We need 2 command buttons.
The output will print names of first 10 students in the array batch on the click event(For-NextLoop)

A)   Property :
Command button : NAME- Command1 , CAPTION- Click
Command button : NAME- Command2 , CAPTION- Exit




B)   Attaching Code to the Object :
Private Sub Command2_Click()
End
End Sub

Private Sub Form_Click()
Dim i As Integer
For i = 0 To 9
Print Batch(i)
Next i
End Sub




=========================================================================
(Check the output)


Back to Home   &  VB

No comments: