D = InputBox("請輸入日期", , Day(Now))
Set WebSht = Sheets("Web")
WebSht.Select
WebSht.Cells.Clear
xURL = "URL;http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report" & Year(Now) & Month(Now) & "/A112" & Year(Now) & Month(Now) & D & "ALLBUT0999_1.php?select2=ALLBUT0999&chk_date="
With ActiveSheet.QueryTables.Add(Connection:=xURL, Destination:=WebSht.Range("$W$1"))
可以用啊 , 給您參考
leading168 wrote:
Dim D As String
D = InputBox("請輸入日期", , Day(Now))
Set WebSht = Sheets("Web")
WebSht.Select
WebSht.Cells.Clear
xURL = "URL;http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report" & Year(Now) & Month(Now) & "/A112" & Year(Now) & Month(Now) & D & "ALLBUT0999_1.php?select2=ALLBUT0999&chk_date="
With ActiveSheet.QueryTables.Add(Connection:=xURL, Destination:=WebSht.Range("$W$1"))
不好意思,這段我實在看不大懂?
似乎是用『查詢』的方式取得?
我現在是用最簡單的
workbooks.open "http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report201501/A11220150109ALLBUT0999_1.php?select2=ALLBUT0999&chk_date="
您這段我複製上去後,怎麼樣都開啟不了
內文搜尋
X




























































































