title: User-defined Type not defined windows 10
body: <p>I have this sub that gets weather information from a weather API. It works on Windows 7 computers but not Windows 10. I get a "User-defined type not defined" error and it highlights the <code>Dim Req As New XMLHTTP</code> line. I have tried to change the DOMDocument to DOMDocument60 and Ive tried to make sure the MicrosoftXML V6.0 is checked.</p>
  
  <pre><code>Public Sub GetWeather(APIurl As String, sted As String)
  
      Dim i As Integer
      Dim ws As Worksheet: Set ws = ActiveSheet
      Dim city As String
      Dim omraade As String
      Dim Req As New XMLHTTP
      Dim Weather As IXMLDOMNode
      Dim wShape As Shape
      Dim thisCell As Range
      Dim Resp As New DOMDocument60
  
      i = 0
      omraade = ""
      omraade = sted
  
      Select Case omraade
          Case "Area1"
              i = 4
          Case "Area2"
              i = 6
          Case "Area3"
              i = 8
      Case Else
          Exit Sub
      End Select
  
      Req.Open "GET", "" &amp; APIurl &amp; "", False
      Req.Send
      Resp.LoadXML Req.responseText
  
      For Each Weather In Resp.getElementsByTagName("current_condition")
  
          Set thisCell = ws.Range(Cells(2, i), Cells(2, i))
          Set wShape = ws.Shapes.AddShape(msoShapeRectangle, thisCell.Left, thisCell.Top, thisCell.Width, thisCell.Height)
  
          wShape.Fill.UserPicture Weather.ChildNodes(4).Text 'img
  
          Cells(3, i).Value = "" &amp; Weather.ChildNodes(7).Text * 0.28 &amp; " m/s" 'windspeedkmph
          Cells(4, i).Value = Weather.ChildNodes(9).Text 'Direction
          Cells(5, i).Value = Weather.ChildNodes(1).Text &amp; " C"  'observation time
      Next Weather
  
  End Sub
  </code></pre>
  
  <p>Any ideas?</p>