|
-
Mar 23rd, 2002, 04:48 PM
#1
whats the problem?
Private Sub form_keypress()
If Keycode = vbKeyA Then
Command20_Click
End If
End Sub
error:
procedure decloration does not match description of event or procedure having the same name
Private Sub form1_keypress()
If Keycode = vbKeyA Then
Command20_Click
End If
End Sub
however has no error but does nothing.
-
Mar 23rd, 2002, 04:50 PM
#2
Frenzied Member
because keypress() isn't the correct event name... try
Private Sub Form_KeyPress(KeyAscii As Integer)
If keyascii = vbKeyA Then
Command20_Click
End If
End Sub
Government is another way to say better…than…you.
It’s like ice but no pick, a murder charge that won’t stick,
it’s like a whole other world where you can smell the food,
but you can’t touch the silverware.
Huh, what luck. Fascism you can vote for.
Humph, isn’t that sweet?
And we’re all gonna die some day, because that’s the American way
-Stone Sour
-
Mar 23rd, 2002, 04:58 PM
#3
works, but i have to press shift + a for it to work. even with the A being lowercase in the code. (i thought it may have been the uppercase) know why?
-
Mar 23rd, 2002, 05:05 PM
#4
Frenzied Member
no, my code worked perfectly fine for me... i tried it before i posted
Government is another way to say better…than…you.
It’s like ice but no pick, a murder charge that won’t stick,
it’s like a whole other world where you can smell the food,
but you can’t touch the silverware.
Huh, what luck. Fascism you can vote for.
Humph, isn’t that sweet?
And we’re all gonna die some day, because that’s the American way
-Stone Sour
-
Mar 23rd, 2002, 05:13 PM
#5
thats odd. ill just prompt caps lock usage. no biggie.
thanks
-
Mar 23rd, 2002, 05:17 PM
#6
Frenzied Member
vbKeyA value is 65, for 'a' use
if KeyAscii = 97 then
' do something
end if
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|