ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¯à§_±N2­ÓVBA¥¨¶°¦X¨Ö¦¨1­ÓVBA¥¨¶°

¦^´_ 50# azrael19
¥i§_À°§Ú©ó"¦¨¥\¤F"¨º¹Ï¥[¤W"¬Q¦¬«ü¼Æ" ¤§¼Æ¾Úµ²ªG  ÁÂÁ ­Y«Ü³Â·Ð §Ú¥i¥H¥Î¨ä¥L¤è¦¡±o¨ì¨ºµ²ªGªº "=C27+D27"

TOP

¦^´_ 49# no3-taco
¥H¤U¤º®e¥i¯à¦³»~ ¦]¬°ÁÙ¬O¥X²{°T®§ "400"
Sub test()
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, 415, 135) '
            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

TOP

¦^´_ 54# azrael19
¤w±N¨º¦æ¥[¤W " ' " (µù¸Ñ)
·PÁ±z¤F
¤£ª¾±z¦³¨S¦³°Ñ»PªÑ²¼ §Ú¦³°µ¤j½L ¤Î ª÷¿ÄÃþªÑªº«ü¼Æ°µ¤ÀªR "¤j½L+ª÷¿Ä²Ö­pµo¥Í²v" ­Y¦³¿³½ì §Ú³]ªk±N²Î­pµ²ªGµ¹±z §Æ±æ¦³¾÷·|¯à¹ï±z¦³©Ò¦^õX

³¡¤À¤§¤@ªº¤ÀªRºI¹Ï

TOP

¦^´_ 56# no3-taco
¨º©Ç¤F ¬O"¦X3"ùتº"«ö¶s5" ¯à¥¿±`°õ¦æ???  
¦]¬°¨ä¾l "§Y®É²b­È"  "¦X1"  "¦X2" ¦b§Ú³o¸Ì¥»¨Ó´N¯à¥¿±`¹B§@ ¥u¦³"¦X3"ùتº"«ö¶s5" °õ¦æ®É·|¥X²{°T®§ "400"
±z½T©w±z¬O°õ¦æ"¦X3"ùتº"«ö¶s5"¶ý?
ÁÂÁ±zªº¥Î¤ß ÁÂÁ¤F

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD