General information
Category:
Coding, syntax & commands
When I run the app, it works fine in calling up MS Excel 2000 and copying the recordset there. But when the machine only has MS Excel 97, the problem is encountered. Below is the code I use:
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets(1)
Thanks!
>>I just created an app that copies a recordset into an excel worksheet. The problem is, when I run the app in some users' pc, i encounter an error about an activex component not being created. I suspect this is due to the different versions of Excel on my pc and user's pc. Is there a way for me to check for different versions of Excel in VB and how to create the excel objects in keeping with the user's version of excel? Some sample code would be a great help. Thanks!
>
>How do you declare your Excel worksheet?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only