1

I have a VB.net control that has an event:

Public Event PassNames(ByVal names() as String)

When the event triggered in VB6, I get the following error:

"Function or interface marked as restriced, or the function uses an Automation type not supported in Visual Basic"

Here is the event in VB6:

Private Sub IteropControl1_PassNames(ByVal names() As String)
      MsgBox "I don't work"
End Sub

Is there a way to uses arrays with Interop User Controls?

1 Answer 1

3

I figured it out what I was doing wrong.

In my VB.net control, my event should be

Public Event PassNames(ByRef names() as String)

instead of

Public Event PassNames(ByVal names() as String)
Sign up to request clarification or add additional context in comments.

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.