Message 1 of 6
Help with getting excel column into vba listbox

Not applicable
06-27-2003
05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to have a column in Excel appear in a lisbox on my user form. I can create a buuton and on user click it populates the box, but I want the box to be filled in without clicking.
Any ideas?
Below is what I have so far:
' FORM INTIALIZES
Private Sub frmMain_Initialize()
Call Set_Up_Excel 'connects to excel
Dim objRange As Excel.Range
Dim xValue As Variant
Set objRange = excelSheet.Range("A1:A40")
xValue = objRange.Value
ListBox1.ColumnCount = objRange.Columns.Count
ListBox1.List = xValue
End Sub
thanks
Don Sauvage
Any ideas?
Below is what I have so far:
' FORM INTIALIZES
Private Sub frmMain_Initialize()
Call Set_Up_Excel 'connects to excel
Dim objRange As Excel.Range
Dim xValue As Variant
Set objRange = excelSheet.Range("A1:A40")
xValue = objRange.Value
ListBox1.ColumnCount = objRange.Columns.Count
ListBox1.List = xValue
End Sub
thanks
Don Sauvage