- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-12-3 17:02 ½s¿è
¦^´_ 8# power82843
3708 ¤W½n§ë±± ¨S¦³¸ê®Æ- Range("C1:C500").Find("ªÑªFÅv¯q³ø¹S²v").Select
½Æ»s¥N½X ¥d¦b³o¸Ì¬O¶Ü?
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex_ROE()
- Dim Sh(1 To 3) As Worksheet, Rng As Range, i As Integer
- Set Sh(1) = Sheets("ӪѸê®Æ")
- Set Sh(2) = Worksheets("ROEÁ`ªí")
- Set Sh(3) = Worksheets("ROE")
-
- '***°õ¦æ¥»µ{¦¡½X¤@¦¸«á,¥i§R°£±¼¨â¦æ¬P¸¹¶¡ªºµ{¦¡½X**
- '*************************************
- '§R°£ ROE ¶¤WQueryTables¤Î QueryTables.Add©Ò·s¼Wªº¦WºÙ
- 'QueryTable¹L¦h,¦WºÙ¹L¦h¤]¬OÀɮ׿±¤jªºì¦]¤§£¸
- With Sh(3)
- For i = .Names.Count To 1 Step -1
- .Names(i).Delete
- Next
- .UsedRange.Clear
- For i = .QueryTables.Count To 1 Step -1
- .QueryTables(i).Delete
- Next
- End With
- '******************************
- With Sh(2)
- .UsedRange.Clear
- .Range("B1") = "++++++++++++++++++++++++++++++++++++++++++++++++++++"
- .Range("B2:J2") = Array("´Á§O", "104", "103", "102", "101", "100", "99", "98", "97")
- .Activate
- End With
- For i = 10 To Sh(1).Range("B281").End(xlDown).Row
- If Sh(1).Range("B" & i) <> "" Then '«DªÅ¥ÕÀx¦s®æ
- With Sh(3).QueryTables.Add(Connection:= _
- "URL;http://stockchannelnew.sinotrade.com.tw/z/zc/zcr/zcra/zcra_" & Sh(1).Range("B" & i) & ".djhtm", Destination:=Sh(3).Range("B1"))
- '.Name = "0000000" '¦WºÙ¥H¼Æ¦r¶}ÀY,·|¦Û°Ê¥[¤W"_" ¬° "_0000000"
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "1"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
- With Sh(3).QueryTables(1)
- Application.StatusBar = i - 9 & " - " & .ResultRange.Range("b2") & " ªÑªFÅv¯q³ø¹S²v §¹¦¨"
- If .ResultRange.Rows.Count > 5 Then
- Sh(2).Range("b1").End(xlDown).Offset(1, -1).Resize(, .ResultRange.Columns.Count) = .ResultRange.Rows(16).Value
- Sh(2).Range("b1").End(xlDown).Offset(, -1) = Sh(1).Range("C" & i)
- Sh(2).Range("b1").End(xlDown).Offset(, -1).Activate
- Else
- Sh(2).Range("b1").End(xlDown).Offset(1) = "¬dµL " & .ResultRange.Range("b2") & " °]°È¤ñ²vªí¸ê®Æ(¦X¨Ö¦~ªí)"
- End If
- .ResultRange.Clear '²M°£¶×¤J¥~³¡ªº¸ê®Æ
- Sh(3).Names(.Name).Delete '§R°£¦Û°Ê·s¼Wªº¦WºÙ
- .Delete '§R°£ QueryTable ª«¥ó
- End With
- End If
- Next
- End Sub
½Æ»s¥N½X |
|