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: 18
Default Combobox will not fill

Hello:

I am a relative novice at VBA programming but here goes...

In Excel, I am trying to fill a combobox ("ComboBox1") in a user form
("inputBox") through a dynamic named range in the "MasterDataSheet"
worksheet of my workbook. The dynamic named range is named
"ClientList" and is referenced with the formula
=OFFSET(MasterDataSheet!$B$1,0,0,1,COUNTA(MasterDa taSheet!$1:$1)-1)

The fact that the list I want to populate into the combobox is across
columns rather than rows is giving me some difficulty. Below is the
code for my user form. Can someone please help me with where I am gong
wrong?

Option Explicit

Private Sub UserForm_Initialize()
Dim cName As Range
Dim ws As Worksheet
Set ws = Worksheets("MasterDataSheet")

For Each cName In ws.Range("ClientList")
With Me.ComboBox1
.AddItem cName.Value
.List(1, .ListCount - 1) = cName.Offset(0, 1).Value
End With
Next cName
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
Fill a Combobox from a ROW? Rob[_5_] Excel Discussion (Misc queries) 4 January 15th 09 08:12 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Better way to fill a ComboBox ? [email protected] Excel Programming 4 November 1st 06 03:18 PM
Fill combobox from DLL JJ[_9_] Excel Programming 0 April 14th 06 10:02 AM
Fill a combobox karibou Excel Programming 2 January 27th 04 04:13 PM


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