It's pretty hard to give you a correct answer without knowing what kind of object JBHRCom is, but assuming that you stick to "talking" naming convention, GetConnection method returns an object of ADODB.Connection type. I would try something like this instead: Dim Con_Getcon As New JBHRCom Dim Con_ObjDB As New ADODB.Connection Set Con_ObjDB = Con_Getcon.Connection