PDA

View Full Version : [SOLVED] Calculator buttons repeat very slowly



hiflier
04-13-2014, 09:12 PM
I built my own calculator because I wanted dynamically programmable keys. It works well except that if you repeat a key quickly it only registers about 1/2 the time. If I hit any combination of different keys there is no noticeable delay. It's only when I try to repeat a given key that it is too slow to be acceptable. Each numeric key is a button that has the following code (example is for the 0 key):

Private Sub CommandButton0_Click()
MyText = MyText & "0"
boxResult.Value = MyText
End Sub

Thanks for your help.

snb
04-14-2014, 01:17 AM
Pleas use code tags !

this will be sufficient:


Private Sub CommandButton0_Click()
boxResult.Value = boxresult.value & "0"MyText
End Sub

Without a sample workbook it's hard to tell (e.g. which eventtriggering is taking place)

jonh
04-14-2014, 07:13 AM
It's firing the double click event which you haven't coded.

Use mouseup instead.

hiflier
04-14-2014, 08:46 PM
Problem solved. Mouseup worked. That's a real relief. Thanks a lot, I've been agonizing over this for too long.