My code isn't working

E

eric

My VBA Code is not working. Everytime I run the code it
comes up with "User-defined type not defined". The code
is
Private Sub equipexport_Click()
Dim oXL As Excel.Application
Dim oWkb As Excel.Workbook
Dim oWks As Excel.Worksheet
Dim rstSubForm As DAO.Recordset
Dim iRow As Integer

and so on...

The second line is the highlighted line
(Dim oXL As Excel.Application).

I've used this before (on Office 2000, I now have XP) but
now it doesn't work. Thanks in advance for your help
eric
 
P

Peter Russell

I'll ask the basic question then.
Have you set the references to Excel and DAO?

Regards

Peter Russell
 

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