ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Excelºô­¶¥~³¡¸ê®Æ¶×¤J¥¢±Ñ¤§¸Ñ¨M(.Refresh BackgroundQuery:=False)

[µo°Ý] Excelºô­¶¥~³¡¸ê®Æ¶×¤J¥¢±Ñ¤§¸Ñ¨M(.Refresh BackgroundQuery:=False)

³Ìªñ»Ý­n¨Ï¥ÎVBA¨Ó§ì¨ú¤@¨Çºô­¶¤Wªº¸ê®Æ¡A©Ò¥H¨Ï¥Î¨ìºô­¶¥~³¡¸ê®Æ¶×¤J¡A

·í¶}©l¿ý»s¥¨¶°¡A´Nµo²{¥X²{¤F¿ù»~¡A­«½Æ´X¦¸¥ç¬O¦p¦¹¡AÀ˵ø¤F¤@¤Uµ{¦¡½X¡A

Á`¬O¦b .Refresh BackgroundQuery:=False ³o¦æµ{¦¡½X¥X²{¿ù»~¡A·Q°Ý­n¦p¦óÃÒ¤~¥¿½T?

'***********************
' ¤U¸ü¤W¥«¿Ä¸ê¾lÃB¸ê®Æ
'***********************
Sub WebQuery_TWII_Credit(theDATE As String)
                           
    Dim theURL, saveSheetName As String
        
    saveSheetName = "download2"
   
    With Sheets(saveSheetName)
        .Visible = True
        .Select
        .Cells.Clear
    End With
   
    theURL = "http://www.tse.com.tw/ch/trading/exchange/MI_MARGN/MI_MARGN_2.php?select2=MS&type=list&input_date=" & theDATE
   
    With Sheets(saveSheetName).QueryTables.Add(Connection:="URL;" & theURL, Destination:=Range("A1"))
        .Name = "Credit"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlAllTables
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .Refresh BackgroundQuery:=False
        .Delete  '°O±o¤â°Ê¥[¤J
    End With
        
End Sub

ÁÂÁ¤j®aªº¦^ÂСA§A­Ì´£¨Ñªº¤èªk§Ú³£¸Õ¸Õ¬Ý¡A·P®¦~

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD