用通用的有效的方法错误捕捉on error goto DoLoadError
  if WinSock(3).parent is me then
     msgbox "WinSock(3) load"
  end if
noload: 
  ...
  ..
  exit sub
DoLoadError:
   if err.number=340 then
      msgbox "WinSock(3) No load"
      resume noload    
   end if