- ©«¤l
- 7
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 12
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2016-9-28
- ³Ì«áµn¿ý
- 2017-3-5
|
¦U¦ì«e½ú¤j®a¦n,
§Ú³Ìªñ¶}©l¾ÇVBA¦³³\¦h°ÝÃD¡A¥i¯à¦³«Ü¦h°ÝÃD¤Ó°ò¥»ÁٽЦU¦ì¦h¦h®ü²[¡A¤]½Ð¤£§[µ¹¤©«Øij¡AÁÂÁÂ!
¥H¤U¬O¥Ø«e¹J¨ìªº°ÝÃD¡A§Ú±NWebªí®æ¶×¤JA sheet¡A¦A±NA sheet ¤¤ªº"ªÑªFÅv¯q³ø¹S²v"½Æ»s¨ìB sheet¡A¥i¬O¨C¦¸¤j¬ù¶]80µ§¸ê®Æ«á´N·|¥d¦í¡A±j¨î°±¤îµ{¦¡¦A«·s±Ò°Ê·|Åã¥Ü .Refresh BackgroundQuery:=False ³o¤@¦æ¿ù»~¡A¦ýÃö±¼Excel ¦A«·s¶}©l´N¥i¥HÄ~Äò¶]¡A¦b½×¾Â¤¤¦n¹³¦³¬Ý¨ìÃþ¦ü°ÝÃD¦ýÁÙ¬O¸Ñ¤£¥X¨Ó¡AÁٽЦU¦ì«e½úÀ°¦£¬Ý§Úªº°ÝÃD¬O¥X¦bþ¡A·PÁÂ!
For i = 281 To Sheets("ӪѸê®Æ").Range("B281").End(xlDown).Row
Worksheets("ROEÁ`ªí").Range("B1").Value = "++++++++++++++++++++++++++++++++++++++++++++++++++++"
Worksheets("ROE").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://stockchannelnew.sinotrade.com.tw/z/zc/zcr/zcra/zcra_" & Sheets("ӪѸê®Æ").Range("B" & i) & ".djhtm", Destination:=Range("B1"))
.Name = "0000000"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range("C1:C500").Find("ªÑªFÅv¯q³ø¹S²v").Select
Range(Selection, Selection.End(xlToRight)).Copy
Worksheets("ROEÁ`ªí").Select
Worksheets("ROEÁ`ªí").Range("B1").Select
ActiveCell.End(xlDown).Select
lastrow = ActiveCell.Row
ActiveSheet.Paste Destination:=Worksheets("ROEÁ`ªí").Range("b" & lastrow + 1)
Worksheets("ROEÁ`ªí").Range("A" & lastrow + 1).Value = Worksheets("ӪѸê®Æ").Range("C" & i).Value
Worksheets("ROE").Select
Worksheets("ROE").Range("B1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Delete
Next
End Sub[/code] |
|