LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Type mismatch passing arrays via COM

I'm trying to pass an array from my VBA app into managed COM
component but am getting "Type mismatch: array or user-defined type
expected error" on the array name where it's being used as a parameter
to the COM call.

The COM method (in C#) is declared as follows:

[ComVisible (true)]
public void TrippleArray(ref double[] input)
{ /*implementation*/ }


I'm trying to call it in VBA using this:

Dim tester As New MyAddin3.Connect
Dim inputNums(10) As Double
' load numbers into inputNums

tester.TrippleArray (inputNums)

 
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
ByRef argument type mismatch when passing dictionary object signon77 Excel Programming 7 January 8th 08 10:03 PM
type mismatch error when passing collection byRef Tara H Excel Programming 2 September 14th 07 05:56 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Passing Userform Listbox to sub causes type-mismatch error Kleev Excel Programming 2 October 19th 05 08:46 PM
Help - Type mismatch when running loop with strings from arrays Marie J-son[_5_] Excel Programming 3 March 19th 05 08:36 PM


All times are GMT +1. The time now is 06:38 PM.

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"