Help! i am trying to send data to multiple users using the winsock control. the program i am creating is a chat program that has a server that clients connect to. the code i am currently using is below.

Dim i As Integer

For i = 1 To intMax
SendKeys "{ENTER}", False
MsgBox ""
sckServer(i).SendData data
Next

intMax is an integer that keeps track of the number of winsock controls.
when i dont use the sendkeys and msgbox, the data doesnt get sent back to the first client to connect to the server. when i put the sendkeys and msgbox in, it works fine. i cant understand why this is, any ideas would be appreciated! Thanks.