Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error trapping ComboBox input
This is driving me mad... I want a combobox to react in this way...
The combo will dropdown and provide a selection of three options "E" "L" or "N" If the user types in say... "E" it accepts this and moves on. If he types say "R" it will complain and not move-on. I can get the combo to select "E" from the dropdown and it works. But type "E" (an exact match) and it complains. I have gone through all the settings suggested in this newsgroup but can't get this simple error trap and acceptance sequence...... I must be missing the obvious can any one please help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error trapping ComboBox input
I created a small userform with a couple of comboboxes and tried this:
Option Explicit Private Sub UserForm_Initialize() With Me.ComboBox1 .Style = fmStyleDropDownList .MatchEntry = fmMatchEntryComplete .AddItem "E" .AddItem "L" .AddItem "N" End With End Sub I couldn't duplicate your results. Snowfire wrote: This is driving me mad... I want a combobox to react in this way... The combo will dropdown and provide a selection of three options "E" "L" or "N" If the user types in say... "E" it accepts this and moves on. If he types say "R" it will complain and not move-on. I can get the combo to select "E" from the dropdown and it works. But type "E" (an exact match) and it complains. I have gone through all the settings suggested in this newsgroup but can't get this simple error trap and acceptance sequence...... I must be missing the obvious can any one please help. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error trapping ComboBox input
what do you mean by "accepts and moves on" ? are you running some code ? is
this a userform combo or is it on a sheet ? "Snowfire" wrote in message ... This is driving me mad... I want a combobox to react in this way... The combo will dropdown and provide a selection of three options "E" "L" or "N" If the user types in say... "E" it accepts this and moves on. If he types say "R" it will complain and not move-on. I can get the combo to select "E" from the dropdown and it works. But type "E" (an exact match) and it complains. I have gone through all the settings suggested in this newsgroup but can't get this simple error trap and acceptance sequence...... I must be missing the obvious can any one please help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error trapping ComboBox input
Dave, Patrick, thanks for your replies. I was trying to load the
selections via the DropButtonClick event and this was causing me all sorts of problems. Once I put them in the UserForm_Initialize the selections (thanks for the code) behaved as expected? Not related to this problem but I was unable to get my posting from my home computer? Had to wait til I got back to work....No matter how I "googed" the search"?? (hence the delay in replying).... but found older requests I had placed for help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Trapping | Excel Discussion (Misc queries) | |||
while deleting rows it finds an error - error trapping | Excel Programming | |||
Error Trapping from WSH | Excel Discussion (Misc queries) | |||
Combobox options based on the input of another combobox | Excel Programming | |||
Trapping Data Input with Curser Keys or Entry Key | Excel Programming |