Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Functions
Message
 
À
28/04/2003 17:29:31
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00782309
Message ID:
00782515
Vues:
13
Jim,

I do not think that there should be difference. I believe the syntax should be:
lnresult = .Run("MyCalcSum(1,3)")


>Thanks for the response. Is there a different way to call a subroutine that I created in Excel? The code I have is below.
>
>Excel Spreadsheet Code sheet 1 code
>
>   Public Function MyCalcSum(number1 As Integer, number2 As Integer)
>       MyCalcSum number1 + number2
>   End Function
>
>
>I want to call the function above with automation code. Here is the code from the calling program.
>
>   With oExcel
>        .Workbooks.Open ("C:\calledfromaccess.xls")
>         lnresult = .Run("MyCalcSum", 1, 3)
>        .Quit
>    End With
>
>
>I get the following error message when I run the code above:The macro 'MyCalcSum' cannot be found.
>
>Thanks
>
>Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform