Creating an incramental counter

I need to create a counter that will count in incraments of 1 every time I click a command button, and display the number on a label on the same form.  Any suggestions would be mucho appreciated.
agendaAsked:
Who is Participating?
 
mark2150Connect With a Mentor Commented:
put this in Form_Load

Command1.tag = 0

PRIVATE Command1_Click()
count = val(command1.tag)
count = count + 1
command1.tag = count
label1.caption = count
END SUB


0
 
agendaAuthor Commented:
This did not work, it say's cannot assign to a read only property.  I tried it in the form_load and the command button.  but it has not worked
0
 
mark2150Commented:
Oops! COUNT is a reserved word. Change it to CNT and it'll work.

M

0
 
JohnnCommented:
Email me if you want a cool odometer control

jnickle@shaw.wave.ca
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.