What's wrong with this code

A

Ayo

I got this code from "The Access Web" site and I have used it before without
any problems but now I am getting a "User-defined type not defined" error on
line 2. I can't figure out what that means>

1 Private Sub AddVendor_Click()
2 Dim objXL As Excel.Application
3 Dim objWkb As Excel.Workbook
4 Dim objSht As Excel.Worksheet
5 Dim db As Database
6 Dim rs As Recordset
7 Dim intLastCol As Integer
 
B

Beetle

Open a VB winow, go to Tools/References and make sure that the Microsoft
Excel Object Library is checked
 
A

Ayo

Thanks Sean. I would have never guessed that.

Beetle said:
Open a VB winow, go to Tools/References and make sure that the Microsoft
Excel Object Library is checked
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top