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: 13
Default Loading a unique list of names from a range into a combobox

Hi! This worked too! Thank you!

Frank

On Sun, 24 May 2015 17:02:33 -0400, GS wrote:

Try this in the userform code window...

Option Explicit

Private Sub UserForm_Initialize()
LoadComboList
End Sub

Sub LoadComboList()
Dim n&, sNames$, vNames
Const lNames& = 14 '//names column index

vNames = ThisWorkbook.Sheets("QueryBuster").UsedRange
For n = LBound(vNames) To UBound(vNames)
If InStr(sNames, vNames(n, lNames)) = 0 Then
sNames = sNames & "," & vNames(n, lNames)
End If
Next 'n
Me.ComboBox1.List = Split(Mid(sNames, 2), ",")
End Sub



 
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
Using Unique Values in as a combobox value list Ayo Excel Discussion (Misc queries) 0 March 7th 08 01:51 PM
trouble loading a range into a comboBox Janis Excel Programming 5 January 17th 08 03:33 PM
Loading sheet names in Combobox Sige Excel Programming 5 September 16th 05 05:09 PM
how to populate a combobox with a list of unique values? RIOSGER Excel Programming 2 August 9th 05 04:16 AM
Populate unique list in combobox Mark Excel Programming 3 July 26th 05 09:27 AM


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