![]() |
mswinsck.ocx
Fung wrote:
Hello I use the following codes to pass a socket message to another server. It works in the debug mode when I execute it step by step using F8. However, it returns error when I execute it by pressing F5 or by clicking CommandButton1. The error is: [40006] Wrong protocol or connection state for the requested transaction or request. Any idea about this? =============================================== Private WinSock As Object Private Sub CommandButton1_Click() Set WinSock = New MSWinsockLib.WinSock With Winsock .Protocol = sckTCPProtocol .RemoteHost = "server1-2000" .RemotePort = 690 .Connect End With Winsock.SendData strMessage End Sub Fung, Please post your message only once and be patient. Now you are spamming the newsgroup (although maybe not intended). This actually *reduces* your chance of ever getting an answer, because people tend to ignore (or even filter out) multiple identical posts. -- Amedee To top-post is human, to bottom-post and snip is sublime. |
All times are GMT +1. The time now is 10:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com