Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA Combobox "Enter"

If it's an ActiveX combobox then catch Enter in its Keydown event like this:

Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
If KeyCode = 13 Then
KeyCode = 0 'cancel the keystroke
MsgBox "Entered!" 'do something custom
End If
End Sub

Ths Forms combos don't have events like this.

HTH. Best wishes Harald


"arceaf" skrev i melding
...

Hi,

I'm trying to program VBA to hit the "Enter" key in a Combo Box, but I
don't remember the proper code. Here is what I have:

Application.Shapes("ComboBox1") = True

Can anyone help me out?

Thanks!




--
arceaf



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
command button and the "enter" and "tab" keys dr chuck Excel Programming 10 September 11th 06 12:09 AM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
Combobox: Make "Enter" = Select brucemc[_26_] Excel Programming 2 July 6th 06 10:52 PM
"enter" event of activex combobox? crapit Excel Programming 11 July 13th 04 11:59 AM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"