LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Listbox vs Combobox

Thanks for your help!
Les

"merjet" wrote:

It's easier to populate a ComboBox when all the items
are in one column, but in one row is doable. To disable
allowing the user to add items, include the next-to-last
line below, or set it in the Properties Window.

Private Sub UserForm_Initialize()
Dim c1 As Range
Dim c2 As Range
Dim iCol As Integer

Set c1 = Sheets("Airports").Range("C1")
Set c2 = c1.End(xlToRight)
For iCol = 3 To c2.Column
ComboBox1.AddItem c1.Offset(0, iCol - 3).Value
Next iCol
ComboBox1.Style = fmStyleDropDownList
End Sub

Hth,
Merjet




 
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
Listbox vs Combobox WLMPilot Excel Programming 3 February 16th 07 10:00 PM
comboBox vs Listbox Steve Excel Programming 2 March 14th 06 12:23 AM
Combobox v Listbox MBlake New Users to Excel 5 April 24th 05 11:58 AM
Combobox/listbox FSt1 Excel Discussion (Misc queries) 3 January 4th 05 06:55 PM
Combobox or Listbox Kathy[_7_] Excel Programming 2 December 4th 03 03:48 PM


All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"