Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't forget to give Tom credit for helping you out.
"Minitman" wrote: Hey Tom, Thanks for the tip on the OFFSET I was having problems with it and couldn't figure out why, And yes there is a header row. Thanks again for your help, it is appreciated. -Minitman On Mon, 3 Oct 2005 17:22:56 -0400, "Tom Ogilvy" wrote: If you have something in B1, then this definition =OFFSET(List!$B$2,0,0,COUNTA(List!$B:$B),1) will include a blank cell at the end of the range. since you set it up this way, I assumed B1 was empty. if not, then you need to change the defintion to =OFFSET(List!$B$2,0,0,COUNTA(List!$B:$B)-1,1) or to change the code to: Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim rng As Range, sVal As String, res As Variant Set rng = Range(ComboBox1.RowSource) sVal = ComboBox1.Value res = Application.Match(sVal, rng, 0) If IsError(res) Then ' change next line rng.Offset(rng.Rows.Count-1, 0).Resize(1, 1).Value = _ ComboBox1.Value ComboBox1.RowSource = "" ComboBox1.RowSource = "lVendor" ComboBox1.Value = sVal End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
LIST ENTRY ENABLE DROP DOWN LIST TO ACCEPT MORE THAN 1 ENTRY | Excel Discussion (Misc queries) | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
How do I set up entry box to auto-alphabatize each entry in list? | Excel Discussion (Misc queries) | |||
drop down list shows first blank row after last list entry | Excel Discussion (Misc queries) | |||
Combobox - add manual entry to future list | Excel Programming |