title: QueryTable not being created
body: <p>I am trying to call information from Yahoo Finance but I keep on getting an error saying the url I am trying to use is not giving any information. However when I manually put the url in I get the data and when I use that url in an .iqy file it works. I got the following vba code when I recorded a macro, but the macro doesn't run.</p>
  
  <pre><code>Sub GetandArrangeData()
  '
  ' GetandArrangeData Macro
  '
  ' Keyboard Shortcut: Option+Cmd+b
  '
      With ActiveSheet.QueryTables.Add(Connection:= _
          "URL;http://real-chart.finance.yahoo.com/table.csv?s=1112.HK&amp;d=4&amp;e=15&amp;f=2015&amp;g=d&amp;a=5&amp;b=27&amp;c=2000&amp;ignore=.csv" _
          , Destination:=Range("C3"))
          .PostText = "MSN MoneyCentral Stock Quotes_1"
          .Name = False
          .FieldNames = False
          .RefreshStyle = xlInsertDeleteCells
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .HasAutoFormat = True
          .RefreshOnFileOpen = 1
          .BackgroundQuery = False
          .TablesOnlyFromHTML = True
          .SaveData = True
          .Refresh BackgroundQuery:=False
          .UseListObject = False
      End With
      Columns("C:C").Select
      Selection.TextToColumns Destination:=Range("C1"), DataType:=xlDelimited, _
          TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
          Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
          :=Array(Array(1, 5), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 9), _
          Array(7, 9))
      Columns("D:F").Select
      Selection.EntireColumn.Hidden = True
  End Sub
  </code></pre>
  
  <p>I get the following error each time : </p>
  
  <p><img src="https://i.stack.imgur.com/5f0Cp.png" alt="enter image description here"></p>
  
  <p>For some reason the ampersands in the url vanish, no idea why.</p>