Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Remove blank rows from combobox

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!



  #2   Report Post  
Posted to microsoft.public.excel.programming
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!





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
How do I remove LOTS of blank rows at once brewster56 Excel Discussion (Misc queries) 7 September 10th 09 02:50 PM
Remove Blank and Non Data Rows UT Excel Discussion (Misc queries) 3 June 12th 07 10:01 PM
formula to remove blank rows Bryan Excel Discussion (Misc queries) 1 January 25th 06 03:52 PM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM
remove all blank or empty rows [email protected] [email protected] Excel Programming 8 January 18th 04 07:55 PM


All times are GMT +1. The time now is 08:43 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"