- ©«¤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
        
|
¦^´_ 1# GaryC - With .Document
- .all("myear").Value = Year(xDate) - 1913 '¤é´Á¥iקï
- MsgBox .getElementsByName("myear")(0).Value
- .all("mmon").Value = Format(Month(xDate) - 1, "0#")
- For Each E In .GetElementsByTagName("INPUT")
- If E.Value = "¬d¸ß" Then E.Click
- Next
- End With
½Æ»s¥N½X ¨C¤@Óºô¶(HTM )ªº«Ø¸m³£¤£¤@¼Ë.- Option Explicit
- Sub Ex_ºô¶¤¸¯À()
- Dim i As Integer, E As Object
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate "http://www.twse.com.tw/ch/trading/indices/MI_5MINS_HIST/MI_5MINS_HIST.php"
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- With .Document
- '*** ³o¬qµ{¦¡½X¥i¬d¬Ý³oºô¶ªº¤¸¯À¤º®e
- On Error Resume Next
- For Each E In .all
- i = i + 1
- Cells(i, "a") = E.tagname '¨Ï¥Î .GetElementsByTagName("INPUT")
- Cells(i, "b") = E.ID '¨Ï¥Î .GetElementByID("menu")
- Cells(i, "c") = E.Name '¨Ï¥Î .all("myear")
- '.getElementsByName("myear")(0).Value ' = Year(xDate) - 1911
- ' HTML ¤¤³q±`¨ã¦³¬Û¦Pªº name ÄÝ©Ê¡^¡A©Ò¦³ getElementsByName() ¤èªkªð¦^ªº¬O¤¸¯Àªº¶°¦X¡A¦Ó¤£¬O³æ¤@Ó¤¸¯À¡C
- Cells(i, "d") = E.Value
- Cells(i, "e") = E.innertext
- Cells(i, "f") = E.Type
- Cells(i, "g") = E.href
- Next
- End With
- ' .Quit 'Ãö³¬ºô¶
- End With
- End Sub
½Æ»s¥N½X |
|