Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing arrays from Excel (VBA) to C# uisng COM interop

Hi - I'm using VS2005/Excel 2007 and can pass scalars from Excel to a C#
class exposed with [ClassInterface(ClassInterfaceType.AutoDual)] and setting
the assembly to Register for COM Interop and all works fine until I try to
pass an integer array from VBA to C#: I initially get "Function or interface
marked as restricted, or the function uses an Automation type not supported
in VB" and when I add "ref" to the C# function I get "Type mismatch: array
or user defined type expected".

Does anyone know what the trick to use to allow passing arrays (and ideally
other data types, objects, and returning various data types to Excel) from
Excel to a C# assembly?

Thanks.

Jon.

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
Passing Arrays to SUBs Bill Martin[_3_] Excel Programming 4 October 27th 06 02:37 PM
Passing Arrays from Excel to Word [email protected] Excel Programming 0 March 10th 06 05:07 PM
Passing arrays to VBA module Ralph K Excel Programming 1 November 20th 04 02:57 PM
passing arrays between functions in VBA Tom Ogilvy Excel Programming 3 March 1st 04 05:54 PM
Passing arrays to a subroutine Braden Craig Excel Programming 4 August 17th 03 05:54 PM


All times are GMT +1. The time now is 03:58 PM.

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

About Us

"It's about Microsoft Excel"