0

I'm making a C# interface which my VBA code can call. The method takes an array of string as parameter, and it has to be a ref type, pass by value (without ref in C#) gives me error when calling the function in VBA.

Error when calling the interop method in VBA:

Compile error: Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic

4
  • what is the signature of the method? Commented Oct 14, 2014 at 3:17
  • @kennyzx currently it's object[,] Foo(ref string[] input), but I want object[,] Foo(string[] input) which give me error when calling in VBA. Commented Oct 14, 2014 at 4:04
  • add the information and the error message to the question? Commented Oct 14, 2014 at 4:21
  • Try this [Passing string array from VB6 to C#.net][1] [1]: stackoverflow.com/questions/23507416/… Commented Oct 14, 2014 at 8:29

0

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.