Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing an Excel spreadsheet
Message
 
À
16/03/2001 16:44:18
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00486132
Message ID:
00486198
Vues:
13
>I have actually a VBA application - it's a macro that I have added a bunch of code to - that must parse through the cells of an Excel spreadsheet looking for a certain value.
>
>What is the code that that will tell the progam to do that?

You want to run a macro stored in Excel from VB?

Use the Run method. See what the help file gives you:

This example shows how to call the function macro My_Func_Sum, which is defined on the macro sheet Mycustom.xlm (the macro sheet must be open). The function takes two numeric arguments (1 and 5, in this example).

mySum = Application.Run("MYCUSTOM.XLM!My_Func_Sum", 1, 5)
MsgBox "Macro result: " & mySum
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform