| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§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«×
 ½Æ»s¥N½XOption 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
 | 
 |