- ©«¤l
- 62
- ¥DÃD
- 14
- ºëµØ
- 0
- ¿n¤À
- 86
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- offffice2013
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2016-8-23
- ³Ì«áµn¿ý
- 2017-11-5
|
¥»©«³Ì«á¥Ñ bioleon69 ©ó 2016-10-5 01:31 ½s¿è
·PÁÂGBK¥H¤Îlai¨â¦ì¤j¤j
³£¦¨¥\¤F~~¦b½Ð±Ð¤@¤U
§Ú·Q¥[¤J¦bA1¦pªG¨S¦³¿é¤J¥¿½TÅܼÆ
©ÎªÌ¿é¤J¿ù»~
B1·|§e²{ ½Ð¿é¤J¥¿½TªÑ²¼¥N¸¹
¤U±¬O¦³¨º¸Ì¦³°ÝÃD??
§Ú¥[¤J¤F³o´X¦êµ{¦¡½X
On Error Resume Next
.Refresh False
[B1] = ""
If Err <> 0 Then
[B1] = "½Ð¿é¤J¥¿½TªÑ²¼¥N¸¹"
Else
End If- Option Explicit
- Sub Ex_ºô¶¤¸¯À()
- Dim i As Integer, xlTab As Object, R As Integer, C As Integer, Surl$
- Surl = "http://www.cmoney.tw/finance/f00026.aspx?s=" & Sheets("¤u§@ªí1").[A1]
- With CreateObject("InternetExplorer.Application")
- .Visible = False
- .Navigate Surl
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Set xlTab = .Document.ALL.tags("TABLE")(0)
- With ActiveSheet
- .UsedRange.Clear
- For R = 0 To xlTab.Rows.Length - 1
- For C = 0 To xlTab.Rows(R).Cells.Length - 1
- .Cells(R + 1, C + 1) = xlTab.Rows(R).Cells(C).innertext
- On Error Resume Next
- .Refresh False
- [B1] = ""
- If Err <> 0 Then
- [B1] = "½Ð¿é¤J¥¿½TªÑ²¼¥N¸¹"
- Else
- End If
- Next
- Next
- End With
- .Quit 'Ãö³¬ºô¶
- End With
- End Sub
½Æ»s¥N½X |
|