- ©«¤l
- 161
- ¥DÃD
- 26
- ºëµØ
- 0
- ¿n¤À
- 187
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2011-1-2
- ³Ì«áµn¿ý
- 2022-2-16
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-9-19 08:26 ½s¿è
ºô§}¤U¿ù¤F¡A¦A«¤W¸ü
Private Sub GetDividend(ByVal ss As String)
Dim rr As String
rr = "http://yamstock.megatime.com.tw/asp/stockinfo/GetReport.asp?select_table=html\Ficxxx\&stockid=" & ss & "&name1=D4&index1=12" ' ¥¿½Tªº
¤u§@ªí2.Select
Cells.Clear
Set ie = CreateObject("internetexplorer.application") '¨Ï¥Î¦¹¤è¦¡¥i¥H§K°£ "³]©w¤Þ¥Î¶µ¥Ø"
With ie
.Visible = False 'True¬°¶}±Òie, False¬°¤£¶}±Òie
.Navigate rr
Do While .ReadyState <> 4 'µ¥«Ýºô¶¶}±Ò
DoEvents
Loop
.ExecWB 17, 2 'Select All
.ExecWB 12, 2 'Copy selection
¤u§@ªí2.Range("A1").Activate
ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
False, NoHTMLFormatting:=True
End With
ie.Quit
End Sub
Sub AllFile()
Dim i As Integer, v
For i = 2 To ¤u§@ªí1.Range("A" & ¤u§@ªí1.Rows.Count).End(xlUp).Row
v = ¤u§@ªí1.Cells(i, 1).Value
Call GetDividend(v)
¤u§@ªí1.Cells(i, 9).Value = ¤u§@ªí2.Cells(34, 8).Value: ¤u§@ªí1.Cells(i, 10).Value = ¤u§@ªí2.Cells(33, 8).Value
¤u§@ªí1.Cells(i, 11).Value = ¤u§@ªí2.Cells(32, 8).Value: ¤u§@ªí1.Cells(i, 12).Value = ¤u§@ªí2.Cells(31, 8).Value
¤u§@ªí1.Cells(i, 13).Value = ¤u§@ªí2.Cells(30, 8).Value: ¤u§@ªí1.Cells(i, 14).Value = ¤u§@ªí2.Cells(29, 8).Value
¤u§@ªí1.Cells(i, 15).Value = ¤u§@ªí2.Cells(28, 8).Value: ¤u§@ªí1.Cells(i, 16).Value = ¤u§@ªí2.Cells(27, 8).Value
If ¤u§@ªí2.Cells(34, 8).Value > 0 And ¤u§@ªí2.Cells(33, 8).Value > 0 And ¤u§@ªí2.Cells(32, 8).Value > 0 _
And ¤u§@ªí2.Cells(31, 8).Value > 0 And ¤u§@ªí2.Cells(30, 8).Value > 0 And ¤u§@ªí2.Cells(29, 8).Value > 0 _
And ¤u§@ªí2.Cells(28, 8).Value > 0 And ¤u§@ªí2.Cells(27, 8).Value > 0 Then
¤u§@ªí1.Cells(i, 17).Value = 1
Else
¤u§@ªí1.Cells(i, 17).Value = 0
End If
Next
End Sub
=================
½Ð°Ý On Error Resume Next
n¥Î¦b FOR NEXT ¤U¤è
ÁÙ¬O ¤U¤è
n§PÂ_¬O§_¤j©ó0¬On¥Î AND ÁÙ¬O &
¦pªG¦³¤£¬O¼Æ¦rªº¨Ò"-"n¦p¦ó
ÁÂÁÂ |
|