Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Functions
Message
From
28/04/2003 17:29:31
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00782309
Message ID:
00782481
Views:
17
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
Thanks

Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform