Sub 取得網頁原始碼()
Dim uObj As Object, uFF As Object, xURL$, xFile$
Dim ST1$, ST2$, F1&, F2&
xURL = "https://tw.stock.yahoo.com/d/s/company_" & uRng.Text & ".html?" & Rnd
For j = 3 To xC
uTxt = MySht.Cells(3, j): If uTxt = "" Then GoTo 101
Set fRng = WebSht.Cells.Find(uTxt, Lookat:=xlWhole)'儲存格內容完全相同
If fRng Is Nothing Then GoTo 101
If uTxt = "現金股利" Or uTxt = "合計" Then
uRng(1, j).Resize(1, 4).Value = Application.Transpose(fRng(2, 2).Resize(4, 1).Value)
ElseIf uTxt = "每股淨值" Then
With uRng(1, j): .Value = fRng: .Replace "每股淨值:* ", "": End With
Else
uRng(1, j) = fRng(1, 6)
End If
101: Next j
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/) |