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

[µo°Ý] CreateObject("InternetExplorer.Application") °õ¦æ§¹¦³®É·|µLªk¸õ¥X??

¦³µL¿ìªk±N¦¹ºô­¶¶×¤JEXCEL ??

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-1-9 07:31 ½s¿è

http://www.twse.com.tw/ch/trading/exchange/TWTB4U/TWTB4U.php  (ºô¯¸·í¤Ñ¸ê®Æ¤j¬ù21:00·|§ó·s)

TOP

¦^´_  t8899

ªí®æ¤¤«ö¤U·Æ¹«¥kÁä
GBKEE µoªí©ó 2014-1-9 09:08


¤é´Á§ï¬°1/8 ·|Åܦ¨¨â­Ó¸ê®Æ®Ø(³£»Ý­n¶×¤J)
²Ä¤@­Ó¶×¥X·|Åܦ¨1/9 (·í¤é)(¤µ¤é¸ê®Æ±ß¤W¤~·|update)
²Ä¤G­Ó¶×¥X·|Åܦ¨"¦¹web¨S¦³¶Ç¦^¸ê®Æ............"

Snap1.jpg
2014-1-9 14:37

TOP

¦^´_  t8899
GBKEE µoªí©ó 2014-1-9 15:43


±z¤]§â¹dÃB¥æ©ö¤é¦¨¥æ¸ê°T¤]©ñ¶i¨Ó, ÁÂÁÂ

TOP

¦^´_  t8899
GBKEE µoªí©ó 2014-1-9 15:43

¦A½Ð±Ð¤@¤U¡A¦p¦ó¤£­n¦Û°Ê½Õ¾ãÄæ¼e??

TOP

¤é´Á§ï¬°1/8 ·|Åܦ¨¨â­Ó¸ê®Æ®Ø(³£»Ý­n¶×¤J)
²Ä¤@­Ó¶×¥X·|Åܦ¨1/9 (·í¤é)(¤µ¤é¸ê®Æ±ß¤W¤~·|update)
²Ä ...
t8899 µoªí©ó 2014-1-9 14:37

½Ð±Ð¤@¤U
1 ==> webURL = "URL;http://www.twse.com.tw/ch/trading/exchange/TWTB4U/TWTB4U.php

2 ==>  With CreateObject("InternetExplorer.Application")
   .Navigate "http://newmis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"

1,2¦³¦ó¤£¦P?? ²Ä¤G­Ó¥i¥H¥Î§ï¥Î²Ä¤@­Ó¤èªk ??

TOP

[µ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
Snap1.jpg
2014-1-13 11:54

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-1-13 15:40 ½s¿è

¦³®É¥i¥H¸õ¥X??¦³®É¤SµLªk¸õ¥X??¯u©_©Ç.......
¥J²ÓÆ[¹î¡A²Ä¤@¦¸°õ¦æ¬°¨â­Óieplorer.exe ¦b°õ¦æ ??¡A±µ¤U¨Ó´N¤@¦¸¤@­Ó........
§Ú§â   .Visible = True  '==> enable
´Ý¯d¬O¤@­ÓªÅ¥Õªººô­¶

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-1-14 09:00 ½s¿è
¦^´_  t8899
¦¹ºô­¶ªºµ{¦¡½X
GBKEE µoªí©ó 2014-1-13 17:40

1.¦¹ºô­¶¦³¤T­Óªí®æ¡A§Ú¥u­n
²Ä¤G­Ó©ñ¤JA1¤Î
²Ä¤T­Ó"ªÑ²¼"Äæ¦ì©ñ¤JC5
¦p¦ó­×§ï?
2.¥Ñ©ó§Ú30¬í·|°õ¦æ¤@¦¸¦¹µ{§Ç
­ÉIE §ì¶}¶}ÃöÃö¡A¦ü¥G¸ûºC...¥Î¤W¼Óªºµ{§Ç¦³®ÉÁÙ¬O·|¥d¦íµLªkÃö³¬?(¤@ª½¥X²{"ok"°T®§µøµ¡")
¬O§_¦³¨ä¥L¼gªk??

TOP

¤@ª½¥X²{"ok"°T®§µøµ¡¬O®M¤J§Úªº¥¨¶°ªº¤@¬q
For i = 1 To 10
Dim aaa As Variant
aaa = Sheets("Sheet5").Range("C3")
If IsNumeric(aaa) Then Exit For
If Not IsNumeric(aaa) Then Run "timestock"
Next

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-1-14 14:48 ½s¿è
¦^´_  t8899
¤@ª½¥X²{"ok"°T®§µøµ¡??  §A¬O¤¤¾Ç¥ÍÀ³¸Ó·|Ãö³¬³o"ok"µøµ¡.¦³°ÝÃD¸ÕµÛ¦Û¤v¸Ñ¨M,VBA¤~·|¶i¨B. ...
GBKEE µoªí©ó 2014-1-14 13:50

  '  MsgBox "0K"
¥D­n¤£¬OMsgBox ªº°ÝÃD¡A¬Oie ¸õ¤£¥X¨Ó..........
²{¦b¤S¥i¥H¸õ¥X¨Ó¤F!
ÁÂÁÂ! §Ú¦Û¤v¦bºCºC§ä..........
§Ú¤]¦³¿³½ì§â¥¦§ä¥X¨Ó!:)

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD