VB块Else没有End If
Private Sub Com_Send_Click()Dim h
If Com_Send.Caption = "发送文件" Then
If FileLen > 0 And FilePath <> "" Then
For h = 0 To Winsock2.UBound
Winsock2(h).SendData UTF8_Encode("101")
Winsock2(h).SendData UTF8_Encode(filename)
Com_Send.Caption = "取消发送"
SendFile.Text = "正在等待对方响应......"
FileSend = True
Else-----------------------------------此行出错
MsgBox "尚未选择文件或文件长度为零", 64, "提示"
End If
Else
MsgBox "请先建立连接!", 64, "提示"
Else
Winsock2.SendData UTF8_Encode("255")
FileSend = False
Com_Send.Caption = "发送文件"
Label4 = "工作状态:空闲"
End If
End Sub