-
August 14th, 2002, 10:08 AM
#1
can´t simulte the spacebar key
I have a problem on a code i`m building, i need to simulate pressing the space bar key on a control Button that was built as an ActiveX but it doesnt allows to select it by pressing any other keys than the space bar.
Does anyone know how coul i make this work???.
-
August 14th, 2002, 10:17 AM
#2
Set the focus on your control and use SendKey to send the spacebar key, should workl...
JeffB
-
August 14th, 2002, 10:23 AM
#3
space bar key code
My problen is because i didnt find any code for the spacebar key; does anyone knows wich is it, for the sendkeys function???
-
August 14th, 2002, 10:37 AM
#4
-
August 14th, 2002, 10:46 AM
#5
Example
Hi,
I tried it but it didn´t work, this is how i used it:
sendkeys "32"
is this correct???
Thanks,
-
August 14th, 2002, 10:59 AM
#6
-
August 14th, 2002, 11:05 AM
#7
Untested...
Maybe you can try SendKeys Chr(32)
How about SendKeys {SPACE} or
SendKEys {SP}.
That is not in the online help.
Cheers,
Laurent
-
August 14th, 2002, 12:25 PM
#8
That works, it send the key "SPACE" to the command2 command button, and the msgbox pop up
Code:
Private Sub Command1_Click()
Me.Command2.SetFocus
SendKeys " "
End Sub
Private Sub Command2_Click()
MsgBox "pressed"
End Sub
JeffB - hope it helps
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
|