dsauvage
Structural
- Jul 25, 2002
- 1
Be patient, I'm new to vba.....
Software: Excel 2000 & ACAD 2002
I have a spreadsheet that has multiple columns, I want the first column to appear as a listbox in a vba form. I have it working provided the user clicks a button to fill the listbox, but I want the lisbox to be populated upon intializing.
This is what I have for the button, and it works flawlessly,
Private Sub CommandButton1_Click()
Call Set_Up_Excel 'connects to excel
'frmMain.Hide 'hide the form
Err.Clear
Steel_Shp.ColumnCount = 1 'set number of columns to show
Steel_Shp.List = Worksheets("Sheet1"
.Range("A1:A40"
.Value 'select range to show A1 (column A row1 to column A row 40)
'frmMain.Show 'show the form
End Sub
I tried to intialize in
Private Sub frmMain_Initialize()
But nothing Happens ??
Can someone help?
Thanks
Don Sauvage
Software: Excel 2000 & ACAD 2002
I have a spreadsheet that has multiple columns, I want the first column to appear as a listbox in a vba form. I have it working provided the user clicks a button to fill the listbox, but I want the lisbox to be populated upon intializing.
This is what I have for the button, and it works flawlessly,
Private Sub CommandButton1_Click()
Call Set_Up_Excel 'connects to excel
'frmMain.Hide 'hide the form
Err.Clear
Steel_Shp.ColumnCount = 1 'set number of columns to show
Steel_Shp.List = Worksheets("Sheet1"
'frmMain.Show 'show the form
End Sub
I tried to intialize in
Private Sub frmMain_Initialize()
But nothing Happens ??
Can someone help?
Thanks
Don Sauvage