Click Event taking time

W

William Benson

Excel 2003: I have buttons on a userform which have very simple code
attached. I am finding that clicking from one to the next, the second button
does not fire if I click in modestly quick succession. This will be a pain
to my user, who is trying to enter numbers like clicking on a calculator
pad.

Is there a way to get successive click events to fire more rapidly? For
these buttons, the only activity in the click event is to append the numeric
they clicked to a textbox's value, like the calculator ap.

Thanks.

Bill
 
P

Peter T

Hi Bill,

Probably waiting for a non existent double click event. Try using the
mouseup event.

Private Sub CommandButton1_Mouseup(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

Static i As Long
i = i + 1
Caption = i
End Sub

Regards,
Peter T
 
W

William Benson

Works beautifully, a million thanks Peter!
Peter T said:
Hi Bill,

Probably waiting for a non existent double click event. Try using the
mouseup event.

Private Sub CommandButton1_Mouseup(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

Static i As Long
i = i + 1
Caption = i
End Sub

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top