Hi, I'm trying to get a dll file I created with Silverfrost FTN95 implemented into Excel via VB. I have the following fortran subroutine
SUBROUTINE SRK (C,F,NV,NL,NS,T,P,improved,BETA_IN,LIST,NEQ,Z,SOLID,BETA,Y)
which is defined in FORTRAN this way
PARAMETER (NCMAX=15,NFMAX=15)
INTEGER :: NEQ,F,C INTEGER :: improved INTEGER :: LIST(NCMAX),NV,NL,NS,SOLID(NCMAX)
DOUBLE PRECISION :: P,T DOUBLE PRECISION :: Y(NCMAX,NFMAX) DOUBLE PRECISION :: BETA_IN(NFMAX) DOUBLE PRECISION :: BETA(NFMAX) ,Z(NCMAX)
in VB I have defined it this way:
Declare Sub SRK Lib 'H:\Programs\LUWS (SRK) dll\LUWS_SRK.dll' (ByRef C As Integer, _ ByRef F As Integer, ByRef NV As Integer, ByRef NL As Integer, _ ByRef NS As Integer, ByRef T As Double, ByRef P As Double, _ ByRef improved As Integer, ByRef Betain As Double, ByRef LIST As Integer, _ ByRef NEQ As Integer, ByRef Z As Double, ByRef _ SOLID As Integer, ByRef BETA As Double, ByRef Y As Double)
My big problem is now that when I run my VB script, it never enters the fortran dll. It crashes for some reason and I think it is because Y is a 15x15 matrix. How do you define those in VB?