combobox, textboxs & too much headache

VTTW

New Member
Joined
Mar 24, 2002
Messages
26
I have a workbook (dci database.xls) that is being used as an external database to the workbook (dci.xls) that I use frequently.

When I need to connect to the database, I have a userform that, when initialed, opens the database & set the rowsource for three comboboxes. See the code...

~~~~

Private Sub UserForm_Initialize()
saveedit.Visible = False
Application.DisplayAlerts = False
ChDir "c:program filesdci job folders"
Workbooks.Open Filename:="c:program filesdci job foldersDCI database.xls", UpdateLinks _
:=0
Windows("DCI database.xls").Activate

fablist.RowSource = "=fabdata!A2: A3000"
Englist.RowSource = "=engdata!A2: A3000"
Conlist.RowSource = "=condata!A2: A3000"
End Sub

~~~~~~~~~~

here's my problem, when I try to select data using any of the three comboboxes, I get a run-time error "could not get the column property. Invalid Argument". When the list drops down, the column of data is there, so it's 'soursed correctly, but after I make a selection, I get the run-time error. Here's the code for one of my combo's (all are about the same):

~~~~~~~~~~~~

Private Sub fablist_Change()
Sheets("fabdata").Activate
fabadd1.Value = fablist.Column(1)
fabadd2.Value = fablist.Column(2)
fabphone.Value = fablist.Column(3)
fabfax.Value = fablist.Column(4)
fabcon.Value = fablist.Column(5)
fabemail.Value = fablist.Column(6)

End Sub

~~~~~~~~~~~~~~

The database workbook is still active, so it should be working, but it's not. Any advice about my problem??
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top