Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Triangle or Terror - Arrays, Dlls, and Excel
Message
De
01/09/2000 14:09:09
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
The Triangle or Terror - Arrays, Dlls, and Excel
Divers
Thread ID:
00411901
Message ID:
00411901
Vues:
48
I have a Excel spreadsheet that calls a DLL created in VFP. In the spreadsheet an array is created from some cells and passed to a procedure in the DLL. When Excel calls the procedure in the DLL Runtime Error number 5 occurrs and that's all it says. Also know that this code works with Excel 2000, but not 97 and the client has Excel 97. What's wrong? Code below:

Excel code
Set oCalcs = CreateObject("m1.m1")
Dim sngMulti(1 To 97, 1 To 5) As String
' Fill array with equipment values.
For intI = 1 To 97
For intJ = 1 To 5
sngMulti(intI, intJ) = Worksheets("equipment").Cells (intI + 6, intJ).Value
Next intJ
Next intI

Call oCalcs.e48((sngMulti()), Range("maint!o7").Value)

**** e48 code in DLL ********
PROCEDURE e48
PARAMETERS xvalue, discount
DECLARE xvalue(97,5)
LOCAL m1ports,x,y,z
x = m1ports(@xvalue)
y = 2.95
z = x*y*((100-discount)/100)
RETURN z
ENDPROC


Thanks for the help,

Jim
Thanks

Jim
Répondre
Fil
Voir

Click here to load this message in the networking platform