winsock - object variable not set

D

Dhonan

I am trying to develop a winsock application in VB /MS Access. I have
included the MS Winsock reference in VB and am able to DIM winsock objects
(e.g. Sock1 dim as Winsock).

However, when I try to set values (set as Sock1.remotehost) I get the error
message " Object variableor with block variable not set."

Can anyone help or point me in the right direction.

Thank you
 
D

Dirk Goldgar

Dhonan said:
I am trying to develop a winsock application in VB /MS Access. I have
included the MS Winsock reference in VB and am able to DIM winsock objects
(e.g. Sock1 dim as Winsock).

However, when I try to set values (set as Sock1.remotehost) I get the
error
message " Object variableor with block variable not set."

Can anyone help or point me in the right direction.

Thank you


You'll have to post more of the code leading up to the error. But maybe you
declared the object variable but never set it to anything? Do you have a
statement like this:

Set Sock1 = New Winsock

?
 
D

Dhonan

Thanks Dick - that got me past the error - pretty basic mistake - i don't
create new objects much.

However, I am now getting the error "Error 429: activeX component can't
creat object". Here is all the code (it executes when I click on a control in
a form):

Private Sub Command0_Click()
Dim sock1 As Winsock
Set sock1 = New Winsock
sock1.RemotePort = 1000
End Sub

Any insight?
 
D

Dirk Goldgar

Dhonan said:
Thanks Dick - that got me past the error - pretty basic mistake - i don't
create new objects much.

However, I am now getting the error "Error 429: activeX component can't
creat object". Here is all the code (it executes when I click on a control
in
a form):

Private Sub Command0_Click()
Dim sock1 As Winsock
Set sock1 = New Winsock
sock1.RemotePort = 1000
End Sub

Any insight?


Not a whole lot. A quick Google search suggests the possibility that you
may need a license key entry in your registry, but I have no other
information or experience with this library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top