Information générale
Catégorie:
Codage, syntaxe et commandes
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?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement