winsock - object variable not set

  • Thread starter Thread starter Dhonan
  • Start date Start date
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
 
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

?
 
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?
 
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.
 
Back
Top