#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Combo Grief

I guess if you want to override one of Excel's features you have to
write your own. This was an interesting exercise - perhaps you can
adapt it to what you want :-

'------------------------------------------------------
'- This is Test code - hence bad programming technique
'- The _Change event fires as each character is typed.
'------------------------------------------------------
Private Sub ComboBox1_Change()
Dim MyArray As Variant
Dim Valid As Boolean
MyArray = Array("AAAA", "AABB", "AAAC")
cb1 = ComboBox1.Value
Ln = Len(cb1)
Valid = False
'- check
For n = 0 To 2
If cb1 = Left(MyArray(n), Ln) Then Valid = True
Next
If Valid = False Then
MsgBox ("Please use type a valid entry")
ComboBox1.Value = Left(cb1, Ln - 1)
End If
End Sub
'--------------------------------


Regards
BrianB
=========================================


"Kevin McCartney" wrote in message ...
Hi, I have a combo box on a form, its populated with an
array and the most important settings for the combo box
which I think my problem relates to a
MatchEntry: 1 - frmEntryComplete
MatchRequired: True.

If I type in any old rubish so as not to match an entry I
get the message 'Invalid property value', but I'd like to
change this message but can't find or know where to
replace this message. I thought of some sub procedure like
a Not In List similar to Access, thus if no match clear
the entry and ask the user to try again.

Thank for you 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
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM
3 problems giving me grief. Any help appreciated. Jan Karel Pieterse Excel Programming 0 July 21st 03 11:31 AM


All times are GMT +1. The time now is 03:52 PM.

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"