Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default Populate combobox

Anyone know what code is needed to populate a combobox?

On a sheet there is a column heading called "category" another heading
called "business name" I only want to populate the combobox from a
specified name within the category column. This would thereby only display
the business names for that particular category.

Many thanks if you can be of help.
Pat


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populate combobox

set rng = Range(Cells(1,1),Cells(rows.count,1).End(xlup))
for each cell in rng
if cell.Value = "Category1" then
userform1.Combobox1.AddItem cell.offset(0,1).Value
end if
Next

It might be faster to filter the data.


--
Regards,
Tom Ogilvy

"Pat" wrote in message
...
Anyone know what code is needed to populate a combobox?

On a sheet there is a column heading called "category" another heading
called "business name" I only want to populate the combobox from a
specified name within the category column. This would thereby only display
the business names for that particular category.

Many thanks if you can be of help.
Pat




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
populate combobox with sheet names David Goodall Excel Programming 3 September 12th 04 12:37 PM
populate combobox with sheet names David Goodall Excel Programming 0 September 12th 04 08:55 AM
Populate a combobox Rory[_3_] Excel Programming 2 June 9th 04 04:20 PM
Populate Column Header on ComboBox michael_13143 Excel Programming 1 April 23rd 04 05:45 PM
Populate combobox with visable rows only max Excel Programming 1 February 17th 04 02:27 AM


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