- ©«¤l
- 151
- ¥DÃD
- 25
- ºëµØ
- 0
- ¿n¤À
- 194
- ÂI¦W
- 1
- §@·~¨t²Î
- WINDOWS 10
- ³nÅ骩¥»
- Office 2010 ©Î 2021
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-9-6
- ³Ì«áµn¿ý
- 2024-11-8
|
¥H¤Uªºµ{¦¡½X´£¨Ñ°Ñ¦Ò......
Sub ¦¨¥æ¸ê°T¨ú±o()
Application.ScreenUpdating = False
DATE_REQ = CDate(InputBox("½Ð¿é¤J¥æ©ö¤é´Á, ®æ¦¡ 2011/9/6", , Format(Now(), "yyyy/m/d")))
yyyymm = Year(DATE_REQ) & Format(Month(DATE_REQ), "00")
yyyymmdd = Year(DATE_REQ) & Format(Month(DATE_REQ), "00") & Format(Day(DATE_REQ), "00")
yyymmdd = Year(DATE_REQ) - 1911 & "/" & Format(Month(DATE_REQ), "00") & "/" & Format(Day(DATE_REQ), "00")
Application.DisplayAlerts = False
Cells.Select
Selection.ClearContents
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/genpage/Report" & yyyymm & "/A112" & yyyymmdd & "ALLBUT0999_1.php?select2=ALLBUT0999&chk_date=" & yyymmdd & "" _
, Destination:=Range("A1"))
.Name = "04"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "10"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Columns("A:A").ColumnWidth = 9.63
Rows("4:4").Select
Selection.Delete Shift:=xlUp
Range("C4").Select
end sub |
|