- ©«¤l
- 759
- ¥DÃD
- 249
- ºëµØ
- 0
- ¿n¤À
- 1021
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 11
- ³nÅ骩¥»
- OFFICE2021
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-5-30
- ³Ì«áµn¿ý
- 2024-11-22
|
¥»©«³Ì«á¥Ñ t8899 ©ó 2019-6-3 15:23 ½s¿è
§Ú¬d¤F¤峹¡AGBKEEª©¤j³o¬qµ{¦¡½X°õ¦æ«á¬OªÅ¥Õªº???°õ¦æ¨ì A.Click «á´N¸õ¦^º¶??
Option Explicit
Sub ¤½¶}¸ê°Tºô¶()
Dim A As Object, E As Object
With CreateObject("InternetExplorer.Application")
.Visible = False
.Navigate "http://mops.twse.com.tw/mops/web/t164sb04" 'ºô§}:ºî¦X·l¯qªí
' .Navigate "http://mops.twse.com.tw/mops/web/stapap1" 'ºô§}:¸³ºÊ¨Æ«ùªÑ¾lÃB©ú²Ó¸ê
' .Navigate "http://mops.twse.com.tw/mops/web/t05st22" 'ºô§}:¤½¶}¸ê°TÆ[´ú¯¸-->Àç¹B·§ªp-->°]°È¤ñ²v¤ÀªR->±ÄIFRSs«á->°]°È¤ÀªR¸ê®Æ
Do While .readyState <> 4 Or .Busy: DoEvents: Loop
' .document.getElementById("isnew").Value = "false" '¿ï¾Ü: ¾ú¥v¸ê®Æ
'µù¸Ñ¤W¤@¦æµ{¦¡½X¬° -> ¿ï¾Ü: ³Ì·s¸ê®Æ,¤£·|°õ¦æ If ¤ºµ{¦¡½X
If .Document.getElementById("isnew").Value = "false" Then
.Document.getElementById("isnew").FireEvent ("onchange")
.Document.getElementById("year").Value = "102" '¦~«×
.Document.getElementById("season").Value = "01" 'ºî¦X·l¯qªí:©u§O
.Document.getElementById("month").Value = "08" '¸³ºÊ¨Æ«ùªÑ¾lÃB©ú²Ó¸ê®Æ:¤ë¥÷
End If
'********************************************************************
For Each A In .Document.getelementSbyTAGNAME("INPUT")
'If A.Name = "co_id" Then A.Value = "2317"
If A.Name = "co_id" Then A.Value = ActiveSheet.Range("A1") 'Àx¦s®æ:«ü©w¥N¸¹
If A.Value = " ·j´M " Then A.Click '«ö¤U ·j´M
Next
Do While .readyState <> 4 Or .Busy: DoEvents: Loop
For Each E In .Document.all.TAGS("div")
If E.ID = "table01" Then
.Document.body.innerHTML = E.outerHTML
Do While .readyState <> 4 Or .Busy: DoEvents: Loop
.ExecWB 17, 2 ' Select All
.ExecWB 12, 2 ' Copy selection
With ActiveSheet
.UsedRange.Offset(1).Clear
.Cells(2, 1).Select
.PasteSpecial Format:="HTML"
End With
End If
Next
.Quit 'Ãö³¬ IE
End With
End Sub |
|