Dim strGetDate As String '宣告日期
strGetDate = Format(Range("b1").Value, "YYYYMMDD") '格式化日期
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://www.twse.com.tw/exchangeReport/TWTB4U?response=html&date=20190805&selectType=All" _
, Destination:=Range("$A$4"))
.Refresh BackgroundQuery:=False
.Delete
End With