T
Tom
I have a ComboBox that I wrote a KeyPress event for. Basically, it looks to
make sure that a numeric key has been pressed; if not, then it does a Beep()
and sets e.Handled to True. This should, as I understand it, cause the
character to 'go away' and not be displayed in the box. I have tried this
on a plain old TextBox and it functions as it should. However, with a
ComboBox the character stays in the box! The code (via the debugger) works
fine - if I enter an 'a', it detects it is not a numeric, sets e.Handled =
TRUE, then exits the subroutine. But no matter what I do, the non-numeric
'a' (or whatever character) displays and stays in the combobox.
Anyone explain this? And is there a workaround? Thanks.
Tom
make sure that a numeric key has been pressed; if not, then it does a Beep()
and sets e.Handled to True. This should, as I understand it, cause the
character to 'go away' and not be displayed in the box. I have tried this
on a plain old TextBox and it functions as it should. However, with a
ComboBox the character stays in the box! The code (via the debugger) works
fine - if I enter an 'a', it detects it is not a numeric, sets e.Handled =
TRUE, then exits the subroutine. But no matter what I do, the non-numeric
'a' (or whatever character) displays and stays in the combobox.
Anyone explain this? And is there a workaround? Thanks.
Tom