title: Winsock Error 429: activeX component can't create object
body: <p>So I know that my code below works. The purpose is to create a tcp Ethernet connection between a scale and computer, so that when a weight is read on the scale, the value is displayed on the computer at the push of a button. I copied this code to a new lab machine that was just imaged for me. As for the winsock, I dynamically created it at run-time by adding it to the references. I understand that this is not what I am supposed to do (see: <a href="https://support.microsoft.com/en-us/kb/313984" rel="nofollow">https://support.microsoft.com/en-us/kb/313984</a>). </p>
  
  <p>With a breakpoint at the CFixPicture_Initialize function, the code hits "set tcpC = new Winsock" line and breaks with error 429: avtiveX componenet can't create object. Does anybody have any ideas as to how I can get this license/get this Winsock control to work? Thanks!</p>
  
  <pre><code> Option Explicit
  
  Private WithEvents tcpC As Winsock
  
  Private Sub CFixPicture_Close()
      Set tcpC = Nothing
  End Sub
  
  Private Sub CFixPicture_Initialize()
  
      Set tcpC = New Winsock
      tcpC.LocalPort = 0
      tcpC.Connect "192.168.0.1", 8000
  
  End Sub
  
  Private Sub CommandButton1_click()
  
      On Error GoTo errHandler
     tcpC.SendData "S" &amp; vbCrLf
  Exit Sub
  
  errHandler:
     MsgBox "error:" &amp; Err.Description
  End Sub
  
  Private Sub tcpC_DataArrival(ByVal bytesTotal As Long)
      Dim strData As String
      Dim strDataString As String
      tcpC.GetData strData
      strDataTrim = Mid(strData, 11)
      Text1.Caption = "Weight: " &amp; vbCrLf
  </code></pre>