- ©«¤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 ©ó 2015-7-27 09:53 ½s¿è
¦^´_ 7# lcctno
·í¤U¥uµo¥Í¦Û°Ê¶}±ÒIE11 °±¦b"5¼Óªº¹Ï1.
¦¹µ{¦¡°õ¦æ«á·|¦^¨ìVBA½s¿èµøµ¡,¨Ã¥´¶}'§Y®É¹Bºâ"ªºµøµ¡
½Ð²Ä¤@ÓSTOP ¤§«á«ö¤UF5
¦p°±¯d¦bVBA½s¿èµøµ¡,"§Y®É¹Bºâ"¤@ª½¦³¦r¦ê¥X²{,¥Nªíµ{¦¡¤@ª½¦bµ¥«áIEªº¸ê®Æ,¬OIE ªº°ÝÃD
**½Ð@¤ßµ¥Ô¨ì¤U ¤@Ó STOP ¤§«á«ö¤UF5 **- Option Explicit
- Sub Ex()
- Dim E As Object, Ar(), i As Integer
- Ar = Array("http://www.yuantaetfs.com/#/RtNav/Index", "http://www.yuantaetfs.com/#/Home/Index")
- 'Ar = Array(ºô§}:§Y®É²bÈ,ºô§}:°ê¤º«ü¼Æ) ºô§}¸m¤J°}¦C
- ActiveSheet.UsedRange.Clear
- For i = 0 To 1
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate Ar(i)
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- If i = 0 Then '°ê¤º«ü¼Æ:¤£»Ý«ö¤U¦P·NÁä
- Do
- Set E = .Document.getElementByid("Agree")
- Loop Until Not E Is Nothing
- E.Click
- End If
- .Visible = False
- Application.VBE.MainWindow.Visible = True
- Application.VBE.Windows("§Y®É¹Bºâ").Visible = True
- Stop '¤§«á«ö¤UF5
- Do
- Do
- Set E = .Document.getElementsByTagName("TABLE")(21 + i)
- '§Y®É²bÈ ²Ä21Ó "TABLE" ,'°ê¤º«ü¼Æ ²Ä22Ó "TABLE"
- Debug.Print i, "e Is Nothing ->", E Is Nothing
- Loop Until Not E Is Nothing
- Debug.Print i, "e Is Nothing ->", E Is Nothing, "e.all.Length", E.all.Length
- Loop Until E.all.Length >= IIf(i = 0, 431, 150) '
- Stop '¤§«á«ö¤UF5
-
- Application.VBE.Windows("§Y®É¹Bºâ").Visible = False
- Application.VBE.MainWindow.Visible = False
- .Document.body.innerHTML = E.outerHTML
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- With ActiveSheet
- .Range("A" & IIf(i = 0, 1, 27)).Select
- .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- With .Range(IIf(i = 0, "D16:D17", "C27:C28")).Interior
- .ColorIndex = 35
- .Pattern = xlSolid
- End With
- End With
- .Quit 'Ãö³¬ºô¶
- End With
- Next
- End Sub
½Æ»s¥N½X |
|