Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I am trying to use a VB6 OCX file in .NET but when I try to create the object in .NET it says:

 

'Private Sub New()' is not accessible in this context because it is 'Private'

 

The first thing I checked in the VB6 file was whether there was a Private Sub New, but there was no Sub New at all. I then tried adding a Sub New, but VB wouldn't accept the line.

 

Can anyone help me as to what to do?

 

Thanks,

 

Jamie

Posted

I've tried that. VB6 doesn't understand it. I have also tried:

 

 

Public Sub Class_Initialize()

 

End Sub

 

I've no idea at all what to do!!! :confused:

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...