|
-
February 18th, 2000, 09:56 AM
#1
User-defined type not defined
I try to use an Excel app but each time I put
Dim xlApp As Excel.Application
I receive this error "user-defines type not defined" Why ?
this is my code
Public Sub ExportToExcel(Rs As Recordset, FileName As String)
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
'Instantiate your Excel Objects
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Add()
Set xlSheet = xlBook.ActiveSheet
Dim iRow As Integer
Dim iCol As Integer
Thanks
Redg
-
February 18th, 2000, 09:59 AM
#2
Re: User-defined type not defined
Have you set a reference to Excel in the Project->References menu ?
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|