- ©«¤l
- 81
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 95
- ÂI¦W
- 330
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-2-29
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 1# cudui
Sub ӪѤ馨¥æ¸ê°T()
'
'
Dim ptxt As String
'Dim STK_NO, mmon As String
myear = InputBox("¿é¤J¬d¸ß¥Á°ê¦~", "ӪѤ馨¥æ¸ê°T")
If myear = "" Then
Exit Sub
Else
myear = myear + 1911
End If
mmon = InputBox("¿é¤J¬d¸ß¤ë,1-9¤ë»Ý¸É0¦p02¤ë", "ӪѤ馨¥æ¸ê°T")
If mmon = "" Then Exit Sub
STK_NO = InputBox("¿é¤JӪѥN½X", "ӪѤ馨¥æ¸ê°T")
If STK_NO = "" Then Exit Sub
mym = myear & mmon
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/genpage/Report" & mym & "/" & mym & "_F3_1_8_" & STK_NO & ".php?STK_NO=" & STK_NO & "&myear=" & myear & "&mmon=" & mmon _
, Destination:=Range("A1"))
'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
¸Õ¸Õ¬Ý§a!! |
|