VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Count your Clicks and show the number of clicks on a Commandbutton

by Patrick Lockefeer (VIII) (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 15th August 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Count your Clicks and show the number of clicks on a Commandbutton

API Declarations



'Author Patrick Lockefeer
'European date : 15-08-2005
'Please see my other snippets on page 607,609,610 and this page (611)

'Controls :
'only one Commandbutton with Name : Command1

Rate Count your Clicks and show the number of clicks on a Commandbutton




Private Sub Command1_Click()

Static Count As Integer 'Use the static variable
Count = Count + 1

'Show counting number on the Commandbutton
Command1.Caption = Count

End Sub


Download this snippet    Add to My Saved Code

Count your Clicks and show the number of clicks on a Commandbutton Comments

No comments have been posted about Count your Clicks and show the number of clicks on a Commandbutton. Why not be the first to post a comment about Count your Clicks and show the number of clicks on a Commandbutton.

Post your comment

Subject:
Message:
0/1000 characters