VB Code:
  1. Public Sub testy()
  2.     On Error GoTo ErrorHandler
  3.    
  4. winsock1.senddata <blah>
  5. blah blah code here
  6.    
  7. ErrorHandler:
  8.     MsgBox "Program has detected an error, id: " & Err & ", " & Error
  9. End Sub

but that keeps giving a msgbox with id 0 even when there is no error