LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"