vb 实时错误40006 10
PrivateSubCommand1_Click()DimworknoAsStringDimserveripAsStringDimserverportAsIntegerw...
Private Sub Command1_Click()
Dim workno As String
Dim serverip As String
Dim serverport As Integer
workno = Text3.Text
serverip = Text4.Text
serverport = Text5.Text
Winsock1.RemoteHost = serverip
Winsock1.RemotePort = serverport
Winsock1.Connect
Winsock1.SendData workno '显示错误的行
End Sub
End Sub
我试过把两步分开,第一个连接,再写一个sub发送workno,就可以正确的发送了,不知道为什么 展开
Dim workno As String
Dim serverip As String
Dim serverport As Integer
workno = Text3.Text
serverip = Text4.Text
serverport = Text5.Text
Winsock1.RemoteHost = serverip
Winsock1.RemotePort = serverport
Winsock1.Connect
Winsock1.SendData workno '显示错误的行
End Sub
End Sub
我试过把两步分开,第一个连接,再写一个sub发送workno,就可以正确的发送了,不知道为什么 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询