Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Different versions of excel
Message
De
04/03/2001 21:40:54
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00481240
Message ID:
00481792
Vues:
8
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
Fil
Voir

Click here to load this message in the networking platform