½Ð°Ý¦p¦ó¥Î MSXML2.XMLHTTP ®» »OÆWÃÒ¨é¥æ©ö©Ò ӪѤ릨¥æ¸ê°T
- ©«¤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
        
|
¦^´_ 6# wufonna
Set CreateObject("InternetExplorer.Application")=Nothing
¤£¬OÅܼƬO¤@Ó¹ê»Úªºª«¥ó.
Nothing ÃöÁä¦r¬O¥Î¨Ó±N¤@Óª«¥óÅܼƱq¤@Ó¹ê»Úªºª«¥óùؤÀÂ÷¶}¨Ó¡C¨Ï¥Î Set ³¯z¦¡¥i«ü©w Nothing µ¹ª«¥óÅܼơC
קï¬Ý¬Ý- Option Explicit
- Dim IE As Object '«Å§i¬°³o¼Ò²Õªº¨p¥ÎÅܼÆ(³o¼Ò²Õ¤¤ªºµ{§Ç¥i©I¥sªºÅܼÆ)
- Sub Index()
- Dim i As Integer, I2 As Integer
- Dim x, y, XX, YY, ZZ
- Dim k
- Set IE = CreateObject("InternetExplorer.Application")
- Const AA As Integer = 5
- ¤u§@ªí3.Activate
- '¤u§@ªí3.Select
- With ¤u§@ªí1
- ''''''''¥¼´ú¸Õ
- For i = 2 To .Range("A" & .Rows.Count).End(xlUp).Row
- Call Ex_1(Split(Date, "/")(0) & Format((Split(Date, "/")(1)), "00"), I2)
- Next
- '''''''¥¼´ú¸Õ
- End With
- End If
- IE.Quit '¦bSub Index() µ{¦¡µ²§ô«eÃö³¬ºô¶
- End Sub
- Sub Ex_1(SS As String, MM As Integer)
- Dim i As Integer, S As Integer, k As Integer, A As Object, II, j
- ' ¤u§@ªí3.Select
- With IE
- ' .Visible = True
- On Error Resume Next
- .Navigate "http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/STOCK_DAY_print.php?genpage=genpage/Report" & SS & "/" & SS & "_F3_1_8_" & MM & ".php&type=list"
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Ep .document.getElementsByTagName("table")(1).outerHTML
- ' .Quit 'Ãö³¬ºô¶
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|