- ©«¤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# pupai
¸Õ¸Õ¬Ý- Option Explicit
- Const ¸ê°T = "ӪѸê°T"
- Const ¥Dªí = "¬d¸ßªí"
- Sub ¸ü¤J¥þ³¡¼Æ¾Ú()
- Dim Rng As Range, e As Range
- With Sheets(¥Dªí)
- .Range(.[a4], .[a4].End(xlDown)).Offset(, 1).Resize(, 11) = ""
- For Each e In .Range(.[a4], .[a4].End(xlDown))
- ¼Æ¾Ú e
- Next
- End With
- End Sub
- Sub ¸ü¤JӪѼƾÚ()
- ¼Æ¾Ú ActiveCell
- ActiveCell.Resize(, 12).Select
- End Sub
- Private Sub ¼Æ¾Ú(xRng As Range)
- Dim xUrl As String
- If xRng.Parent.Name <> ¥Dªí Then MsgBox "½Ð¿ï¾Ü " & ¥Dªí & " ªºÓªÑ½s¸¹ ½d³ò ": Exit Sub
- With Sheets(¥Dªí)
- If Intersect(.Range(.[a4], .[a4].End(xlDown)), xRng) Is Nothing Then MsgBox "½Ð¿ï¾Ü " & ¥Dªí & " ªºÓªÑ½s¸¹ ½d³ò ": Exit Sub
- End With
- xUrl = "URL;http://tw.stock.yahoo.com/d/s/dividend_" & xRng & ".html"
- With Sheets(¸ê°T)
- If .QueryTables.Count <> 0 Then
- .QueryTables(1).Connection = xUrl
- Else
- .QueryTables.Add xUrl, .[A1]
- End If
- With .QueryTables(1)
- .WebSelectionType = xlSpecifiedTables
- .WebTables = "7,10"
- .Refresh BackgroundQuery:=False
- xRng.Cells(1, 2) = Replace(Split(.ResultRange.Cells(1, 1), " ")(0), xRng, "")
- xRng.Cells(1, 3).Resize(, 10) = Application.WorksheetFunction.Transpose(.ResultRange.Cells(6, 6).Resize(10))
- xRng.Cells(1, 3).Resize(, 10).NumberFormatLocal = "G/³q¥Î®æ¦¡"
- End With
- End With
- Beep
- End Sub
½Æ»s¥N½X |
|