ÃÒ¥æ©Ò¥þ³¡¤W¥«ªÑ²¼¥æ©ö©ú²Ó¤U¸ü
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 13# white5168
G¤j³o¸Ì«ü¥O«Ü§¹¾ã,À³¸Ó¤£¬O¶¼Æ¦^ÂаÝÃD (§Ú¤]´ú¸Õ¹L³oÓ¶±¦^ÂÐ)
Do While .Busy Or .ReadyState <> 4 ---->³o¸Ì(4)¤åÀɤw¸g¸ÑªR§¹²¦ , ¥Î¤áºÝ¥i¥H±µ¨üªð¦^®ø®§
DoEvents
Loop |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 11# GBKEE
µL½×¬O¥ý°õ¦æ ¬d¸ßªÑ²¼¤é³øªí()¡A¦Ó«á°õ¦æ ¥þ³¡¤é³øªí()¡A
¥ç©Î ³æ¿W¥ý°õ¦æ ¥þ³¡¤é³øªí()¡A µ²ªG¬O¤@Pªº¡C
®t§O¥u¦b©ó¤¤Â_®É¤§Åª¨úªÑ²¼¥N½X¦ì¸m¤§¦h¹è¦Ó¤w¡C
¥X²{ªº¿ù»~°T®§¦p¤U¡G
|
|
|
|
|
|
|
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 13# white5168
§ã×N!¤SÂ_¤F
§Úªº3.5G³o»ò¤£Ã!
¨ä¹êW¤jªº,§Ú¤@ª½³£¤£¯à¥¿±`¨Ï¥Î
¥½¾ÇÁÙ¦³«Ü¦h¬Ý¤£À´,©Ò¥H¥ý¾Ç¬Ý»yªk
°»¿ù¦b If TestFolder = False Then TestObj.CreateFolder (CSVfolder)
|
|
|
|
|
|
|
- ©«¤l
- 90
- ¥DÃD
- 16
- ºëµØ
- 0
- ¿n¤À
- 114
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- sp2
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-7-9
- ³Ì«áµn¿ý
- 2018-10-7
|
¦^´_ HSIEN6001
ªþµùÂ_ÂI: ³øªí¶¼Æ = element.Item(0).innertext
HSIEN6001 µoªí©ó 2012-8-4 12:06
³oÓ°ÝÃD¦b§Úªºµ{¦¡½X¸Ì¦³¨¾½d¤F,ì¦]«Ü²³æ,¦³ªº®ÉԨϥÎsetª«¥ó®É,¦pªGIE¨S¦³¶}§¹¾ã,±N·|¾ÉPµLªk¨ú±o¹ïÀ³ªºª«¥ó,¦¹®É«K·|µo¥ÍµLªk¨ú±o¶¼Æªº°ÝÃD,¬Ý¨ÓÃö©ó³o¤@ÂI,ª©¥Dn¦A¦htry¤@¤U,³oÓµo¥ÍÂI¤£¬O¨C¦¸³£·|µo¥Í¦b¬Û¦Pªº¦ì¸m,À³¸Ó¦h¼W¥[¨¾½d,¦pªGµLªk¶¶§Q¨ú±o¶¼Æ©Î¬Osetª«¥óµo¥Í°ÝÃD®É,n¶i¦æRetry |
|
|
|
|
|
|
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 11# GBKEE
¿ù»~¼ÆȦbþ¸Ì¬Ý?!
¸ê®Æ§¹¾ã¤U¸ü¨ì1413«á--->1414 err¦b¦p¤Wz¤§¦ì¸m¥X²{°»¿ùÂI
²{¦b¥¿«·s°õ¦æ´ú¸Õ,«o¦¤w¶W¹L1414¥N¸¹
¤£ª¾¹D¬°¦ó·|¤¤Â_
§Ú¦Û¤vªº¥ý«eªº¤U¸ü,¤]±`¦p¦¹;¤Ï¦ÓPM9:00¤§«á
¶]ªº«Ü¥¿±`
§Ú·Q....¬O§_3.5Gªº°ÝÃD?! |
|
|
|
|
|
|
- ©«¤l
- 58
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 66
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-5-21
- ³Ì«áµn¿ý
- 2019-2-26
|
¦^´_ 7# GBKEE
§A¦n¡A§¹¾ãexcelÀÉ®×¥i¥H¤À¨É¶Ü?ÁÂÁ¡C |
|
devidlin
|
|
|
|
|
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 8# HSIEN6001
ªþµùÂ_ÂI: ³øªí¶¼Æ = element.Item(0).innertext |
|
|
|
|
|
|
- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 7# GBKEE
¦n´Î!°õ¦æ³t«×¶W§Öªº!
³ø§i:
¥Ø«e¦³Ó¤¤Â_ÂI¦b¥N¸¹1414
?? |
|
|
|
|
|
|
- ©«¤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 ©ó 2012-8-5 09:23 ½s¿è
¦^´_ 1# white5168
´ú¸Õ §¹¦¨¹Ï
2012/8/5 §ó·sµ{¦¡½X
- Option Explicit
- Dim SH(1 To 2) As Worksheet, IE As Object
- Dim xltheCsv As String, xLMsg As String, Rng As Range
- Const xlPath = "D:\Test1\" '¥iקïCSV¦sÀɪº¸ô®|
- Sub ¥þ³¡¤é³øªí() '¬d¸ß¥þ³¡¤éªÑ²¼³øªí
- Dim T As Date
- ¦sÀɸê®Æ§¨
- T = Time
- xLMsg = "" '¬ö¿ý ªÑ²¼¥N¸¹¨S³øªí
- ¤W¥«ªÑ²¼¥N¸¹ '¨ú±o³Ì·s¤W¥«ªÑ²¼¥N¸¹ªí
- ºô¶ '¶}±Òºô¶
- Set Rng = SH(1).[A3] 'ªÑ²¼¥N¸¹
- Do
- Rng.Select
- ActiveWindow.ScrollRow = Rng.Row - 1
- Application.ScreenUpdating = False
- If Rng.Offset(, 1) <> "" Then ¶×¤J¤é³øªí Trim(Split(Rng, " ")(0)) 'Trim(Split(Rng, " ")(0)):ªÑ²¼¥N¸¹
- Set Rng = Rng.Offset(1) '¤U¤@Ó ªÑ²¼¥N¸¹
- Application.ScreenUpdating = True
- 'Loop Until Rng = "" '<-§t ¤W¥«ªÑ²¼,¤W¥«»{ÁÊ(°â)ÅvÃÒ,¨ü¯qÃÒ¨é-¤£°Ê²£§ë¸ê«H°U--
- Loop Until Rng.Offset(, 1) = "" '<-¶È¦³ ¤W¥«ªÑ²¼ : BÄæ¬OªÅ¥Õ®ÉÂ÷¶}°j°é
- SH(1).Parent.Close 0 'Ãö³¬ ³Ì·s¤W¥«ªÑ²¼¥N¸¹ªí
- IE.Quit 'Ãö³¬ ºô¶
- Set IE = Nothing
- Set Rng = Nothing
- MsgBox "¥þ³¡¤é³øªí¤U¸ü§¹¦¨ ¶O®É" & Format(T - Time, "HH®Émm¤Àss¬í") & Chr(10) & xLMsg
- If xLMsg <> "" Then µL³øªí¬ö¿ý
- End Sub
- Sub ¬d¸ßªÑ²¼¤é³øªí() '¬d¸ß³æ¤@ªÑ²¼¤é³øªí
- Dim ªÑ²¼¥N¸¹ As String, ªÑ²¼ As String, T As Date
- ¦sÀɸê®Æ§¨
- xLMsg = ""
- Do While ªÑ²¼¥N¸¹ = ""
- ªÑ²¼¥N¸¹ = InputBox("ªÑ²¼¥N¸¹", "¿é¤J¬d¸ß¤§ªÑ²¼¥N¸¹", "1101")
- If ªÑ²¼¥N¸¹ = "" Then End
- Loop
- T = Time
- ºô¶
- ¶×¤J¤é³øªí ªÑ²¼¥N¸¹
- IE.Quit
- Set IE = Nothing
- If xLMsg <> "" Then
- MsgBox xLMsg
- µL³øªí¬ö¿ý
- Exit Sub
- Else
- ªÑ²¼ = Replace(Replace(xltheCsv, ".CSV", ""), xlPath, "")
- MsgBox ªÑ²¼ & Chr(10) & "¤U¸ü®É¶¡" & Format(T - Time, "HH®Émm¤Àss¬í") _
- & Chr(10) & "¦sÀɸô®|: " & xlPath
- End If
- Workbooks.Open xltheCsv
- ActiveSheet.Cells.EntireColumn.AutoFit
- End Sub
- Private Sub ¶×¤J¤é³øªí(ªÑ²¼¥N¸¹ As String) '³B¸Ì¶Ç°e¨Óªº --ªÑ²¼¥N¸¹--
- Dim Xall As Integer, SubMsg As String, SubRng As Range
- Xall = Val(³øªí¶¼Æ(ªÑ²¼¥N¸¹)) '¶Ç¦^³øªí¶¼Æ
- If Xall = 0 Then 'µL³øªí¶¼Æ: ³øªí¤£¦s¦b
- If Rng Is Nothing Then
- SubMsg = "[ " & ªÑ²¼¥N¸¹ & " ] µL³øªí"
- Else '¥þ³¡¤é³øªíµ{¦¡: §tªÑ²¼¦WºÙ
- SubMsg = Rng & " µL³øªí"
- End If
- xLMsg = IIf(xLMsg <> "", xLMsg & Chr(10) & SubMsg, SubMsg)
- Exit Sub
- End If
- Set SH(2) = Workbooks.Add(1).Sheets(1) '·s¼W¤@¬¡¶Ã¯
- With SH(2).QueryTables.Add(Connection:="URl;http://bsr.twse.com.tw/bshtm/bsContent.aspx?StartNumber=" & ªÑ²¼¥N¸¹ & "&FocusIndex=All_" & Xall, Destination:=SH(2).Range("A1"))
- .WebFormatting = xlWebFormattingNone
- .WebTables = "4,""table2"""
- On Error Resume Next 'µ{¦¡ÁÙ¦³¿ù»~¤£³B¸Ì
- Do
- Err.Clear '²M°£¿ù»~È
- .Refresh BackgroundQuery:=False 'Refresh ¥¢±Ñ ·|¦³¿ù»~È
- Loop While Err > 0 '¦³¿ù»~ÈÄ~Äò°j°é ª½¨ì Refresh ¦¨¥\
- On Error GoTo 0 '¦³¿ù»~È ¤£³B¸Ì
- '®ø°£: On Error Resume Next ¦pÁÙ¦³¿ù»~¤£³B¸Ì ·|¼vÅT¹B¦æªº¥¿½T©Ê
- SH(2).Names(.Name).Delete
- End With
- If Xall > 1 Then '³B¸Ì¶¼Æ > 1 '²M²zªÅ¥Õ¦C¤Î ¨C¶ªºÄæ¦ì
- With SH(2)
- Set SubRng = .Range(.[A6], .Cells(.Rows.Count, "A").End(xlUp))
- SubRng.Replace "§Ç", "", xlWhole
- SubRng.SpecialCells(xlCellTypeBlanks).EntireRow.Delete xlUp
- End With
- End If
- xltheCsv = xlPath & Format(SH(2).[B1], "yyyy_mm_dd ") & SH(2).[F1] & ".CSV"
- On Error GoTo xlerr 'xltheCsv ¤w¶}±Ò·|¦³¿ù»~ ¨ìxLerr³B¸Ì
- If Dir(xltheCsv) <> "" Then Kill xltheCsv
- On Error GoTo 0
- SH(2).Parent.SaveAs xltheCsv, xlCsv
- SH(2).Parent.Close True
- Exit Sub
- xlerr:
- If Err = 70 Then
- Workbooks(Format(SH(2).[B1], "yyyy_mm_dd ") & SH(2).[F1] & ".CSV").Close 0 'Ãö³¬xltheCsv ¥i²M°£¿ù»~
- Resume '¤Ï¦^¿ù»~¦æ
- Else
- MsgBox "¿ù»~È " & Err & " »Ý°»¿ù!!"
- End
- End If
- End Sub
- Private Sub ¤W¥«ªÑ²¼¥N¸¹() '¤U¸ü³Ì·s¥N¸¹ ( ¤W¥«ªÑ²¼,¤W¥«»{ÁÊ(°â)ÅvÃÒ,¨ü¯qÃÒ¨é-¤£°Ê²£§ë¸ê«H°U )
- Dim SstockId As String
- SstockId = "URL;http://brk.twse.com.tw:8000/isin/C_public.jsp?strMode=2"
- Set SH(1) = Workbooks.Add(1).Sheets(1)
- With SH(1).QueryTables.Add(SstockId, SH(1).[A1])
- .WebFormatting = xlWebFormattingNone
- .WebTables = "2"
- .Refresh 0
- End With
- End Sub
- Private Sub ºô¶() '¶}±Òºô¶
- Dim Url As String
- Set IE = CreateObject("InternetExplorer.Application")
- Url = "http://bsr.twse.com.tw/bshtm/bsMenu.aspx"
- With IE
- '.Visible = False ''¥i¥H¤£Åã¥Ü IE
- .Visible = True
- .Navigate "http://bsr.twse.com.tw/bshtm/bsMenu.aspx"
- Do While .Busy Or .ReadyState <> 4
- DoEvents
- Loop
- End With
- End Sub
- Private Sub ¦sÀɸê®Æ§¨() '¨S¦³CSV¦sÀɪº¸ô®|: ³]¥ßCSV¦sÀɪº¸ô®|
- If Dir(xlPath, vbDirectory) = "" Then MkDir xlPath
- End Sub
- Private Sub µL³øªí¬ö¿ý() '¤u§@ªí¤W¬ö¿ý ¨S³øªíªºªÑ²¼¥N¸¹
- With ThisWorkbook.Sheets(1)
- .Activate
- If .[A1] = "" Then .[A1] = "ªÑ²¼: µL³øªí"
- .Cells(.Rows.Count, "a").End(xlUp).Offset(1).Resize(UBound(Split(xLMsg, Chr(10))) + 1) = Application.Transpose(Split(xLMsg, Chr(10)))
- End With
- End Sub
- Private Function ³øªí¶¼Æ(Sstock_N0 As String)
- Dim element As Object
- On Error GoTo xlerr:
- xlAgain:
- Set element = IE.Document.getElementsByName("txtTASKNO")
- element.Item(0).Value = Sstock_N0
- Set element = IE.Document.getElementsByName("btnOK")
- element.Item(0).Click
- With IE
- Do While .Busy Or .ReadyState <> 4
- DoEvents
- Loop
- End With
- Set element = IE.Document.getElementsByName("sp_ListCount")
- ³øªí¶¼Æ = element.Item(0).innertext
- Exit Function
- xlerr: '³B¸Ìºô¶¤¤Â_
- IE.Quit
- ºô¶
- Err.Clear
- GoTo xlAgain
- End Function
½Æ»s¥N½X |
|
|
|
|
|
|