- 帖子
- 1018
- 主題
- 15
- 精華
- 0
- 積分
- 1058
- 點名
- 0
- 作業系統
- win7 32bit
- 軟體版本
- Office 2016 64-bit
- 閱讀權限
- 50
- 性別
- 男
- 來自
- 桃園
- 註冊時間
- 2012-5-9
- 最後登錄
- 2022-9-28
|
7#
發表於 2014-6-23 19:24
| 只看該作者
回復 6# leoncc
你的 StockNo 是不是也有新增連線?
我也是Excel 2010,底下這樣是沒問題的- Sub 財務比率()
- Dim URL As String
-
- URL = "URL;http://dj.mybank.com.tw/z/zc/zcq/zcra_" & 1101 & ".djhtm"
-
- With ActiveSheet.QueryTables.Add(Connection:=URL, Destination:=ActiveSheet.Range("K68"))
- .TablesOnlyFromHTML = True
- .RefreshStyle = xlOverwriteCells
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .AdjustColumnWidth = False
- .WebTables = "1"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- Cells.Hyperlinks.Delete
- .Delete
-
- End With
- End Sub
複製代碼 |
|