0

Hello Friends,

When i try to show VB.net interop forms within VB 6.0 i have got the error "object variable or with block variable not set ". I was create interop form library in vb.net and use the created TLB as a referece in VB 6.0 and in button click i write the following code.

Dim frm As TestInterop.InteropForm1
frm.Show

when i run the vb project and click on the button i got the above error.
Can you please provide a solution for this. Please reply me as early as possible.

Regards,
Vasanth.

3
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by CodeDoctor
0

Hello Friends,

When i try to show VB.net interop forms within VB 6.0 i have got the error "object variable or with block variable not set ". I was create interop form library in vb.net and use the created TLB as a referece in VB 6.0 and in button click i write the following code.

Dim frm As TestInterop.InteropForm1
frm.Show

when i run the vb project and click on the button i got the above error.
Can you please provide a solution for this. Please reply me as early as possible.

Regards,
Vasanth.

You will need to Instantiate the form before you use it.

Dim frm As [B]New[/B] TestInterop.InteropForm1
frm.Show
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.