title: Socket connection using Excel VBA
body: <p>I have a VB.NET application that successfully sends a string to the specified IP address and port.</p>
  
  <pre><code>Public Sub BroadcastData(ByVal toSend As String, ByVal PortToSendTo As Long)
      Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)
      Dim sendBUF As Byte() = Encoding.ASCII.GetBytes(toSend)
      Dim ep As New IPEndPoint(MainForm.IPToBroadcastTo, PortToSendTo)
      s.SendTo(sendBUF, ep)
      System.Diagnostics.Debug.WriteLine(s.SendTo(sendBUF, ep))
  End Sub
  </code></pre>
  
  <p>The <code>IPToBroadcstTo</code> is the IPaddress of a remote computer on the local network.</p>
  
  <p>On this remote computer I can receive this string and do what I want with it using VB.NET.</p>
  
  <p>I would to receive the string in Excel and write it to a cell.</p>