- ©«¤l
- 7
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¤¤
- µù¥U®É¶¡
- 2012-3-20
- ³Ì«áµn¿ý
- 2023-1-12
|
[µ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 |
|