- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
- Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
- Sub HK()
- Dim URL As String, shts As Worksheet
- Dim x As Variant, xi As Integer, A As Object, xlHtm
- Set shts = ActiveSheet '
- shts.Cells.Clear
- URL = "http://hk.ishares.com/product_info/fund/holdings/2823.htm?periodCd=d"
- With CreateObject("InternetExplorer.Application")
- .Visible = True ' ¬O§_Åã¥Ü IE
- .Navigate URL
- Do While .ReadyState <> 4 Or .Busy
- DoEvents
- Loop
- xlHtm = .Document.body.innerHTML 'Àx¦s
- Sleep 2000
- Set A = .Document.getElementsBytagname("table")
- For xi = 2 To 2
- .Document.body.innerHTML = A(xi).outerHTML
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- With shts
- .Range("A1").Select
- .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- End With
- .Document.body.innerHTML = xlHtm 'ÁÙì
- Next xi
- shts.Cells.EntireColumn.AutoFit ' ¦Û°Ê½Õ¾ãÄæ¼e
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|