tags:

views:

86

answers:

1

i am try to create an uploader in excel using vb (macro) to store data in an access database. i believe in terms of the script everything is ok. its just that when i run the upload it gives me the error Compile error - User-Defined type not defined and once i click on OK it highlights the part where it finds the error which is:

Private Sub Upload_Click() <------ this part!!!! 
Dim cs As ADODB.Connection 
Dim rs As ADODB.Recordset 
Dim ServerName As String 
Dim DatabaseName As String 
Dim TableName As String 
Dim UserID As String 
Dim Password As String

can anybody help me make this work....

A: 

You need to add the reference Microsoft ActiveX Data Objects 2.0 Library'

Menu Item: Tools/References

Chris Persichetti
where do i need to add these Microsoft Activex Data Objects 2.0 library? Sorry im really a bit new to this thats why im seeking help..
Leon
yes i checked that but the references is greyed out.. its not clickable.. what does this mean?
Leon
i figure it out already... thanks dude!
Leon
Glad I could help. Please accept my answer thanks.
Chris Persichetti
what do you mean by accept my answers?? im new in this site..
Leon
There's an outline of a Check-mark next to my answer. Click this check-mark and it should turn green. Thanks!
Chris Persichetti
ok.. got it..:-)
Leon