View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Count Form Button Depressions

Make a public variable in a normal module (at the top), say
something like lCountButtonA, so:
Public lCountButtonA As Long

In form A have somehing like this:

Private Sub CommandButtonA_Click()
lCountButtonA = lCountButtonA + 1
End Sub

In form B have somehing like this:

Private Sub CommandButtonB_Click()
lCountButtonA = 0
End Sub


RBS


"Paul Black" wrote in message
oups.com...
Hi everyone,

I have a Form Button called "A". I would like to count how many times
it is pushed.
I also have a Form Button called "B". I would like the count of Form
Button "A" to reset to ZERO when Form Button "B" is pressed.

Thanks in Advance.
All the Best.
Paul