|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OK i am just starting and learning to use vb.
This looks easy but i am doing somthing wrong How do u make a counter... for example I have a buton and everytime I press that button it goes up by 1... so it starts off with 0 then when an user clicks on the button it goes up by 1 and then 2 and so on... pleasse help... newbie at VB!!! |
|
#2
|
|||
|
|||
|
Code:
Private Sub Command2_Click()
Static x As Integer
x = x + 1
Command2.Caption = x
End Sub
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > simple counter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|