Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Populating combobox/listbox

This topic has certainly been answered before, but I'm not able to find an
answer.

How do you populate list/comoboxes via VBA in Excel. I want to populate the
box with all the elements in a range. Is there web-site that gives good
information about userforms and listboxes in excel?

Torstein S. Johnsen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Populating combobox/listbox

Here's an example:

Private Sub CommandButton1_Click()
Dim rng As Range

For Each rng In Range("A1:A20")
ComboBox1.AddItem rng.Value
Next
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Torstein S. Johnsen" wrote in message
...
This topic has certainly been answered before, but I'm not able to find an
answer.

How do you populate list/comoboxes via VBA in Excel. I want to populate

the
box with all the elements in a range. Is there web-site that gives good
information about userforms and listboxes in excel?

Torstein S. Johnsen




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
Populating listbox Mick[_2_] Excel Discussion (Misc queries) 1 May 14th 08 10:48 PM
Populating TextBox Value--using ListBox jpendegraft[_15_] Excel Programming 1 May 2nd 04 03:53 AM
populating a multi-column Listbox Harald Staff Excel Programming 1 April 26th 04 08:26 PM
Populating a userform 3 col listbox Martin[_13_] Excel Programming 0 April 19th 04 09:49 PM
Populating multicolumn listbox the wrong way notsureofthatinfo Excel Programming 0 October 22nd 03 11:38 PM


All times are GMT +1. The time now is 06:48 AM.

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"