Hi all,
I want to execute all the code in a cmdButton on a userform when a keypress is registerd.
Any ideas? Thanks!Please Login or Register to view this content.
Hi all,
I want to execute all the code in a cmdButton on a userform when a keypress is registerd.
Any ideas? Thanks!Please Login or Register to view this content.
move the code inside the command button routine into a general module (create the module using insert...module and call it as a public sub
eg
public sub doCMD
end sub
then change the cmdbutton code to call doCMD and the keypress if ascii=10 to call docmd
Hope this helps
regards,
Originally Posted by gti_jobert
See amanded code
HTH
--
AP
"gti_jobert" <[email protected]> a
écrit dans le message de
news:[email protected]...
>
> Hi all,
>
> I want to execute all the code in a cmdButton on a userform when a
> keypress is registerd.
>
>
> Code:
> --------------------
>
> Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
> If KeyAscii = 10Then
cmdSearch
> End If
> End Sub
>
> --------------------
>
>
> Any ideas? Thanks!
>
>
> --
> gti_jobert
> ------------------------------------------------------------------------
> gti_jobert's Profile:
http://www.excelforum.com/member.php...o&userid=30634
> View this thread: http://www.excelforum.com/showthread...hreadid=518152
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks