LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multicolumn combobox


In his blog, Dick Kusleika gives this code for populating a listbox. It
assumes the listbox has been set to to have a column count of 3, and
that there is data in columns A, B and C of Sheet 1. I've checked the
code and it works fine. However, I've tried using the same code to
populate a combobox, but it doesn't seem to work. Anyone any idea why?

Thanks, G

Private Sub UserForm_Initialize()
Dim cell As Range
Dim Rng As Range

With ThisWorkbook.Sheets(”Sheet1″)
Set Rng = .Range(”A2″, .Range(”A2″).End(xlDown))
End With

For Each cell In Rng.Cells
With Me.ListBox1
..AddItem cell.Value
..List(.ListCount - 1, 1) = cell.Offset(0, 1).Value
..List(.ListCount - 1, 2) = cell.Offset(0, 2).Value
End With
Next cell

End Sub


--
Gromit
------------------------------------------------------------------------
Gromit's Profile: http://www.excelforum.com/member.php...nfo&userid=928
View this thread: http://www.excelforum.com/showthread...hreadid=503936

 
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
MultiColumn ComboBox Paul Smith[_3_] Excel Programming 2 August 3rd 05 06:36 AM
MultiColumn ComboBox Value set/display Jim Zeeb[_2_] Excel Programming 5 June 13th 05 09:20 AM
Hiding a column in a multicolumn combobox Mike Jones Excel Programming 1 May 3rd 05 12:44 AM
Display multicolumn box Alen32 Excel Programming 6 March 13th 05 12:02 PM
Multicolumn Combo Box PokerDude Excel Programming 2 January 29th 04 04:02 PM


All times are GMT +1. The time now is 02:04 PM.

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"