Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using senddata on a type

Status
Not open for further replies.

shawnnason

Programmer
Jun 12, 2001
26
US
I have created a type as follows:

Code:
Public Type MyData
    command as string
    numval as integer
    capbility as string
End Type
[\code]

When I then try to send this type using the SendData facility of WinSock, I get an error box which says:

Complie Error:

Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions.

The error occurs in this line:

[code]
tcpClient.SendData(theData)
[\code]

Does anyone know what to do to avoid this?  I tried putting my Type declararion in my form code, but that didn't help.  It is currently in a module.

- Shawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top