Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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
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
Error Trapping gazza67[_2_] Excel Discussion (Misc queries) 2 September 6th 07 06:11 PM
while deleting rows it finds an error - error trapping Janis Excel Programming 2 July 19th 07 12:12 AM
Error Trapping from WSH Tom Chau Excel Discussion (Misc queries) 1 August 25th 06 04:21 AM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
Trapping Data Input with Curser Keys or Entry Key Robert Cornwell Excel Programming 1 May 25th 04 02:36 AM


All times are GMT +1. The time now is 02:31 AM.

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

About Us

"It's about Microsoft Excel"