- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# bulletin
¤u§@ªí¤@ª½ªº QueryTables.Add ·s¼WWeb¬d¸ß,ÀÉ®×¶V¨Ó¶VÃe¤j,©ìºCµ{¦¡ªº³t«×- Option Explicit
- Sub DELETE_QueryTables() '¶È¶·°õ¦æ¤@¦¸²M°£©Ò¦³QueryTable
- Dim SH As Worksheet, Q As QueryTable
- For Each SH In Sheets '¬¡¶Ã¯ªº¤u§@ªí¶°¦Xª«¥ó
- For Each Q In SH.QueryTables
- Names(Q.Name).Delete '§R°£ ©w¸q¦WºÙ
- Q.Delete '§R°£ QueryTable
- Next
- Next
- End Sub
- Sub Ex()
- Dim stockid
- stockid = 2303
- With Sheets("CFSQ")
- .Rows("1:64").ClearContents
- If .QueryTables.Count > 1 Then
- .QueryTables(1).Connection = "URL;http://dj.mybank.com.tw/z/zc/zc3/zc3_" & stockid & ".djhtm"
- Else '¨S¦³QueryTable®É·s¼W
- .QueryTables.Add Connection:="URL;http://dj.mybank.com.tw/z/zc/zc3/zc3_" & stockid & ".djhtm", Destination:=.Range("$A$1")
- End If
- With .QueryTables(1) '¤£¦A·s¼W
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "3"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .Refresh BackgroundQuery:=False
- End With
- End With
- End Sub
½Æ»s¥N½X |
|