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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Winsock and VBA

Status
Not open for further replies.

8Ivy

Programmer
Nov 28, 2001
4
CA
Hi there,

I have an existing Access 2000 application and I'm trying to convince it to send messages over Ethernet to another computer. The Winsock control should be able to do this, and it works fine when I try it in VB. However, in VBA, the connect and close methods don't seem to work properly, and they frequently (about nine times out of ten) crash the application and I have to use CTRL-ALT-DEL to kill it. I've installed the latest Win2000, Visual Studios, and Office2000 service packs, and I know I've got the latest version of the Winsock control. Can anyone confirm whether this is a known problem with Winsock and VBA? I've found something documenting the exact same problem in Visual FoxPro, so I'm inclined to think it is a Winsock bug, but I'd like confirmation from someone else who's tried it before I give up and switch to VB.

Thanks,

Ivy
 
This might not be what you want but it's my approach to a similar scenario.

Sub SendMessage(strMachine As String, strMsg As String)

Shell "c:\winnt\system32\net send " & strMachine & " " & strMsg

End Sub
 
Good idea! Unfortunately, it won't work in this case. The "other computer" is actually a robot, and can't recieve messages sent using Net Send.

Thanks anyways!

-Ivy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top