MrExcel Publishing
Your One Stop for Excel Tips & Solutions

UserForm / Click vs Keyboard Enter key

Posted by Jim on January 22, 2001 6:40 PM

I currently have a UserForm w/ a ListBox that i scroll
through and on dbl. click copies and paste the info.
What i would like to do is to be able to use the arrow
keys to do the scrolling and the keyboards Enter key
to do the copying pasteing, is this possible?
any help would be appreciated.

Posted by Dave Hawley on January 22, 2001 9:48 PM

Hi Jim

Shouldn't be a problem just use the KeyPress procedure for your Listbox, with this code:

If KeyAscii=13 Then
<Your Code>
End If

The arrow down should work anyway.

Hope this helps


OzGrid Business Applications