- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-1-28 07:00 ½s¿è
¦^´_ 31# pollllopkimo - Option Explicit
- Sub ¤½¶}¸ê°Tºô¶()
- Dim A As Object, E As Object, Sh As Worksheet
- Set Sh = Sheets("sheet1") 'ª«¥ó: «ü©w¤u§@ªí
- Sh.Activate
- With CreateObject("InternetExplorer.Application")
- '.Visible = True
- ' .Navigate "http://mops.twse.com.tw/mops/web/t164sb04" 'ºô§}:ºî¦X·l¯qªí
- .Navigate "http://mops.twse.com.tw/mops/web/stapap1" 'ºô§}:¸³ºÊ¨Æ«ùªÑ¾lÃB©ú²Ó¸ê
- 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 = Sh.Range("C1") '¦~«×
- '.document.getElementById("season").Value = "01" 'ºî¦X·l¯qªí:²Ä1©u(©u§O)
- .document.getElementById("month").Value = Format(Sh.Range("D1"), "00") '¸³ºÊ¨Æ«ùªÑ¾lÃB©ú²Ó¸ê®Æ:¤ë¥÷
- End If
- '********************************************************************
- For Each A In .document.getelementSbyTAGNAME("INPUT")
-
- If A.Name = "co_id" Then A.Value = Sh.Range("b1") 'ªÑ²¼¥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
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- Do While .ReadyState <> 4 Or .Busy: DoEvents: Loop
- With Sh
- .UsedRange.Offset(4).Clear
- .Range("B5").Select
- .PasteSpecial Format:="HTML"
- .Range("B5").Select
- If .Shapes.Count > 0 Then '¦³¹Ï¤ù
- .Shapes.SelectAll
- Selection.Delete
- End If
- End With
- End If
- Next
- .Quit 'Ãö³¬ IE
- End With
- End Sub
½Æ»s¥N½X |
|