View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steph[_3_] Steph[_3_] is offline
external usenet poster
 
Posts: 312
Default Remove blank rows from combobox

Hi guys. Never mind.....I should have known this!!

UserForm1.ComboBox1.List = Worksheets("Data Tables").Range("A4:A" &
Range("A65536").End(xlUp).Row).Value

Thanks anyway!

"Steph" wrote in message
...
Hi all. I have a userform with comboboxes in it. I populate the combobox
with the following code:

Sub Show_UserForm()
UserForm1.ComboBox1.List = Worksheets("Data Tables").Range("A4:A30").Value
UserForm1.ComboBox2.List = Worksheets("Data Tables").Range("B4:B30").Value
UserForm1.ComboBox3.List = Worksheets("Data Tables").Range("C4:C30").Value
UserForm1.ComboBox4.List = Worksheets("Data Tables").Range("D4:D30").Value
UserForm1.Show
End Sub

The range it is reading from is larger than the number of data entries. I
wanted to allow for the user to add an entry to the combobox pulldown
without having to manipulate code. Can I still allow for this, but at the
same time NOT show 20 blank rows in the combobox pulldown?? Thanks for

your
help!