| ©«¤l765 ¥DÃD255 ºëµØ0 ¿n¤À1033 ÂI¦W0  §@·~¨t²Îwindows 11 ³nÅ骩¥»OFFICE2021 ¾\ŪÅv50 ©Ê§O¨k µù¥U®É¶¡2011-5-30 ³Ì«áµn¿ý2025-10-27 
 | 
[µo°Ý] CreateObject("InternetExplorer.Application") °õ¦æ§¹¦³®É·|µLªk¸õ¥X?? 
| ¥»©«³Ì«á¥Ñ t8899 ©ó 2014-1-13 12:07 ½s¿è 
 CreateObject("InternetExplorer.Application") °õ¦æ§¹¦³®É·|µLªk¸õ¥X??
 ¦³®É·|¦b°O¾ÐÅé¸Ì???¦pªG¤£²z¥¦¡A·|¶V¨Ó¶V¦hÓiexplorer.exe ¨ì³Ì«á·|¥X²{¿ù»~.............
 
 Option Explicit
 Sub timestock()
 Application.ScreenUpdating = False
 Dim i As Integer, S As Integer, K As Integer, j As Integer
 Dim Element
 With CreateObject("InternetExplorer.Application")
 '.Visible = True           '¥iÅã¥Üºô¶
 .Navigate "http://newmis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"
 Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
 Set Element = .document.getelementsbytagname("table")
 On Error Resume Next
 With Sheets("sheet5")
 .Cells.CLEAR
 'For s = 0 To element.Length - 1 '¤£ª¾¦¹ºô¶ªºtable¤º®e:½Ð¥ý¦æ´ú¸Õºô¶ªº§¹¾ãtable¤º®e
 For S = 2 To 3                    '¤w§ä¥Xºô¶ªºtable¤º®e¦b 0-3 ¤¤
 For i = 0 To Element(S).Rows.Length - 1
 K = K + 1
 For j = 0 To 5   '¸ê®ÆªºÄæ¦ì¦@6¦ì
 .Cells(K, j + 1) = Element(S).Rows(i).Cells(j).innerText
 '********************************************
 '¤£ª¾¦¹ºô¶ªºtable¤º®e:¥ý¦æ¦C¥X table ¦ì¸m  *
 'Sheets(2).Cells(k, J + 1) = s             '*
 '********************************************
 Next
 Next
 Next
 '       .Cells.EntireColumn.AutoFit            '¦Û°Ê½Õ¾ãÄæ¼e
 '      .Cells.EntireRow.AutoFit               '¦Û°Ê½Õ¾ã¦C°ª
 End With
 .Quit
 End With
 Set Element = Nothing
 '  MsgBox "0K"
 End Sub
 
     | 
 |