Hey there,
I have a little experience with VBA and thus i need help, tx in advance if anyone can share some clues
what i have is a form with buttons, clicking on them changes values in some form fields.
i need the button when shift-clicked to change the value differently
in my code i have
Private Declare Function GetAsyncKeyState Lib _
"user32" (ByVal vKey As Long) As Integer
and then
Private Sub Bilet1_plus_Click()
If Bilet1_count.Value = "" Then
Bilet1_count.Value = 0
End If
If GetAsyncKeyState(&H10) Then
Bilet1_count.Value = Bilet1_count.Value * 10
Else: Bilet1_count.Value = Bilet1_count.Value + 1
End If
End Sub
and this works fine when shift-click is used, but it also behaves the same when the next click on the same button comes, even if it is not a shift click.
any ideas how to make it work only the first time?
Bookmarks