- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello again,
i am still trying to send a vba dynamic array to a fortran dll ad it doesnt really work.
there is no error, but the results computed inside the dll show, that the values of the array didn't get there.
this is my short testprogram:
VBA:
Option Explicit
Private Declare Sub druckabs Lib "fcall.dll" (n As Long, da() As Double, A As Double)
Public da() As Double
Public n As Long
Public A As Double
Public Sub CommandButton1_Click()
n = Worksheets("tabelle1").Range("b3").Value
ReDim da(2)
da(1) = Worksheets("tabelle1").Range("b1").Value
da(2) = Worksheets("tabelle1").Range("b2").Value
Call druckabs(n, da(), A)
Worksheets("tabelle1").Range("b4").Value = A
End Sub
Fortran:
subroutine
druckabs( n, da_SpWB, A_SpWB)!Einstieg in die Druckabsenkung1-Dll fr Excel: "Pseudo-Hauptprogramm"
!kai 11.11.2006
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL, REFERENCE, ALIAS:'druckabs'::druckabs
implicit none
!Deklarationen der Austauschvariablen mit Excel:
!Input:
!a)Geometrie:
integer
, intent(in) :: nreal(8)
, dimension(2), intent(in) :: da_SpWB !Aussendurchmesser SpWBreal(8)
, intent(out) :: A_SpWB !Wandstrke Bden SpWBA_SpWB = da_SpWB(1) + da_SpWB(2)
end subroutine
druckabscould anyone please help me??
THX
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got the answer - the prob is solved (reading the help can help )
bye

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page