- ©«¤l
- 60
- ¥DÃD
- 26
- ºëµØ
- 0
- ¿n¤À
- 93
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Windows 7
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-9-8
- ³Ì«áµn¿ý
- 2020-4-15
|
¦U¦ì«e½ú §Ú·Qn§â°}¦C¥[¤J¸ê®Æ ,Åý9946¥i¥H±a¤J§Ú©Ò©w¸qªÑ²¼¦Cªí...
¦p¬õ¦â°Ï¶ô
9946-->¨ú¥N¦¨StockArr..
Dim StockArr As variable
StockArr = Array(9946,2330,2317,5522)'µ¥µ¥ªºªÑ²¼
Dim E As Object, i As Integer, ii As Integer, k As Integer
Dim xadte As Date
xadte = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
With CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate "http://www.cnyes.com/twstock/intro/9946.htm"
Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
Set E = .document.getElementsByTAGName("TABLE")(4)
ActiveSheet.UsedRange.Clear
For i = 0 To E.Rows.Length - 1
k = k + 1
For ii = 0 To E.Rows(i).Cells.Length - 1
Cells(k, ii + 1) = E.Rows(i).Cells(ii).INNERTEXT
Next
Next
.Quit 'Ãö³¬ºô¶
End With
Dim yadte As Date
yadte = DateAdd("yyyy", -1, Date) '¤é´Á(°_)¡G
With CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate "http://pchome.megatime.com.tw/stock/9946.html"
Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
Set E = .document.getElementsByTAGName("TABLE")(4)
For i = 0 To E.Rows.Length - 1
k = k + 1
For ii = 0 To E.Rows(i).Cells.Length - 1
Cells(k, ii + 1) = E.Rows(i).Cells(ii).INNERTEXT
Next
Next
.Quit 'Ãö³¬ºô¶
End With
Dim R As Range, Rng As Range
For Each R In ActiveSheet.Range("A:A").SpecialCells(xlCellTypeConstants).Rows
'ActiveSheet(§@¥Î¤u§@ªí) SpecialCells(xlCellTypeConstants "¥]§t±`¼ÆªºÀx¦s®æ")
If Not IsError(Application.Match("¬ÛÃöÅvÃÒ", R, 0)) Then
'¤u§@ªí¨ç¼ÆMatch ´M§ä¨ì0 ¶Ç¦^¼Æ¦r,§ä¤£¨ì0 ¶Ç¦^¿ù»~È #N/A
If Rng Is Nothing Then Set Rng = R Else Set Rng = Union(R, Rng)
'Union ¤èªk ¶Ç¦^¨âөΦhÓ½d³òªº¦X¨Ö½d³ò¡C
End If
Next
If Not Rng Is Nothing Then Rng.EntireRow.Delete '½d³ò¾ãÄæ§R°£ |
|