- ©«¤l
- 14
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 58
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-7-20
- ³Ì«áµn¿ý
- 2020-3-9
|
קï§ì¨úªí®æ°Ñ¼Æ§A¸Õ¬Ý¬Ý
Sub Ex()
Dim xDay As String
xDay = InputBox("¿é¤J¤é´Á", "¤j½L²Îp¸ê°T¤é´Á", Date)
If IsDate(xDay) Then
If Weekday(xDay, vbMonday) < 6 Then
xDay = Format(xDay, "yyyymmdd")
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.twse.com.tw/exchangeReport/MI_INDEX?response=html&date=" & xDay & "&type=ALLBUT0999" _
, Destination:=Range("A1"))
.WebFormatting = xlNone
.RefreshStyle = xlInsertDeleteCells
.AdjustColumnWidth = True
.Refresh BackgroundQuery:=True
End With
Else
MsgBox xDay & " °²¤é¨SÀç·~"
End If
Else
MsgBox "¤é´Á¿é¤J¿ù»~"
End If
End Sub |
|