4

I have a COM-visible object written in C# that accepts a list of string arrays. Could I send a Collection of string arrays from Access 2000 to this object and it work? If not, then what is the best way to send multiple string arrays to my C# object from Access 2000?

3
  • 1
    Note that Access uses VBA. Which is very close but not quite the same as VB6. Commented Aug 17, 2010 at 5:12
  • Oh ok. I just started programming in Access not too long ago. So this is all still kinda confusing to me. I tested out my COM-visible object code in a separate project and called it from a Main method. It worked with a List of string arrays passed to it, but since I have been trying to call it from Access, I have had no luck. Commented Aug 17, 2010 at 23:10
  • Oops, bad day. I thought I was in the text box when I hit enter. Commented Aug 18, 2010 at 22:15

2 Answers 2

4

You can't marshal generics but using Collection on the VB6 side is a workable solution. Effectively convert your List to a standard collection.

Here's something that elaborates more: http://www.codeproject.com/KB/COM/netclasslistvb6.aspx?display=Print

Sign up to request clarification or add additional context in comments.

2 Comments

I'm an experienced Access programmer, but I can't see how the cited URL answers the question. Can you draw it out a bit?
The question was phrased incorrectly, referring to VB6 when the asker meant VBA. The asker clarified this by posting a duplicate question. I edit this question accordingly.
0

I do a lot of com add in work on VBA and vb.net - I find replacing a List (of T) in vb.net with an arraylist works very well in VBA, not all the properties expose exactly the same way in Access, but you can work around it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.