![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hi,
I have a combobox dropdown on a userform, with this i'm using the keyboard arrow up, arrow down keys to make a selection "my question": When i keypress and get to the last item on the dropdown it "jumps out" of the combobox and goes to the next assigned TabIndex. Is there a way to control this so this doesn't happen? In other words arrow up, arrow down without jumping out the combobox? If my explanation makes any sence, any help with this would be appreciated. Regards, James _________________ [ This Message was edited by: James on 2002-05-25 09:21 ] [ This Message was edited by: James on 2002-05-25 15:09 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: May 2002
Posts: 206
|
Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Cancel = True End Sub |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hi Jeff,
Unfotunately i don't think that will do it. Example: Private Sub Cbx2_Percentage_Keypress(ByVal KeyAscii As MSForms.ReturnInteger) On Error Resume Next rw = cbx2_percentage_ListIndex RpasteCell.Value = cbx2_percentage.List(rw) Set RpasteCell =[A63] Me.cbx2_percentage.SetFocus If CInt(Dbx2) = 0 Then MsgBox"Blah,Blah,Blah" End If End If Regards, James |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Posts: 206
|
I've never used the KeyPress event so....
Good luck with it. Just remembered that I forgot to send you that file, sorry...got busy with work. I'll get it to you. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Bump
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|