Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Difficulty with Arrays in Excel's DECLARE statement

Greetings! I am having difficulty with with Arrays in Excel's DECLARE
statement.

My Excel module VBA code is as follows:

Option Base 0
Option Explicit
Public Declare Sub TestPassVars Lib "C:\ExcelDLLs\TestPassVars.dll" (ByRef
MaxInsInv As Double, ByRef SrCount As Double, ByRef K As Long, ByRef
InsiderInv() As Double, ByRef InsiderJrSr() As String, ByRef LstRowData As
Long)

Sub ChkPassVars()

Dim K As Long
Dim MaxInsInv As Double
Dim SrCount As Double
Dim InsiderInv(0 To 100) As Double
Dim InsiderJrSr(0 To 100) As String
Dim LstRowData As Long

K = 4
MaxInsInv = 123321#
InsiderInv(0) = 12333#
InsiderJrSr(0) = "xc"
LstRowData = 5400
SrCount = 3.5

Call TestPassVars(MaxInsInv, SrCount, K, InsiderInv(), InsiderJrSr(),
LstRowData)

End Sub

MaxInsInv, SrCount, K, and LstRowData (all non-arrays) are being passed
correctly to TestPassVars. The arrays, InsiderInv() and InsiderJrSr() are
not being passed to the TestPassVars subroutine.

The TestPassVars subroutine was written in Emergence Basic, compiled as a
DLL, and is as follows:

export TestPassVars
SUB TestPassVars(MaxInsInv:Double BYREF, SrCount:Double BYREF, K:INT BYREF,
InsiderInv[]:Double BYREF, InsiderJrSr[]:String BYREF, LstRowData:Int BYREF)

' Various Print statements to display the parameters passed to TestPassVars.

ENDSUB

I suspect that I have not correctly declared the parameter list of Excel Sub
TestPassVars. Thank you very much in advance for your assistance and
suggestions.

May you have a most blessed day!

Sincerely,

Michael Fitzpatrick
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can use LONGLONG type of C++ Dll in 'Declare Function' statement? Zoo Excel Programming 2 May 10th 06 12:03 PM
"Type" statement and arrays [email protected] Excel Programming 2 February 12th 05 05:13 AM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM
Declare Multidimensional Arrays Alan Beban[_3_] Excel Programming 3 August 21st 03 02:40 AM
Declare Multidimensional Arrays Alan Beban[_3_] Excel Programming 0 August 20th 03 07:03 PM


All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"