ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¥æ©ö©ú²Ó¤U¸ü

¥æ©ö©ú²Ó¤U¸ü

http://bsr.twse.com.tw/bshtm/

³o­Óºô¯¸¤ñ¸û¦³¤H©Ê¤@ÂI  °Ñ¼Æ§äªº¨ì¤]¥i¥H³]©w

¦ý¬O§Ú¤£ª¾¹D­¶¼Æ¦³´X±i

¤gªk·Ò¿û¤@­¶¤@­¶§Ë¤]«Ü¨S¦³®Ä²v

¬d¸ß¤Ó¦h¦¸ÁÙ·|³QÀÉ

½Ð°Ýµ{¦¡¸Ó¦p¦ó¤U¸ü
  1. Sub ­ÓªÑ¥æ©ö©ú²Ó¤U¸ü()
  2.     Dim ªÑ²¼¥N¸¹ As String, ¤é´Á As Variant, N, i As Integer, A, T As Date
  3.     Do While Not IsDate(¤é´Á)
  4.         ¤é´Á = InputBox("¿é¤J¬d¸ß¤é´Á", "¤é´Á", Date)
  5.         If ¤é´Á = "" Then End
  6.     Loop
  7.     Do While ªÑ²¼¥N¸¹ = ""
  8.         ªÑ²¼¥N¸¹ = InputBox("ªÑ²¼¥N¸¹", "¿é¤J¬d¸ß¤§ªÑ²¼¥N¸¹", "1101")
  9.         If ¤é´Á = "" Then End
  10.     Loop
  11.     ¤é´Á = Format(¤é´Á, "yyyymmdd")
  12.     T = Time
  13.     With ActiveSheet
  14.         For Each N In .Names
  15.             N.Delete
  16.         Next
  17.         .Cells.Clear
  18.         Application.StatusBar = False
  19.         On Error GoTo A_Wait
  20.         With .QueryTables.Add(Connection:="URL;http://bsr.twse.com.tw/bshtm/bshtm_report_Messages.aspx?strDate=" & ¤é´Á & "&StartNumber=" & ªÑ²¼¥N¸¹ & "&FocusIndex=1", Destination:=Range("A1"))
  21.             .Name = ¤é´Á & "_" & ªÑ²¼¥N¸¹ & "_1"
  22.             .FieldNames = True
  23.             .RowNumbers = False
  24.             .FillAdjacentFormulas = False
  25.             .PreserveFormatting = True
  26.             .RefreshOnFileOpen = False
  27.             .BackgroundQuery = True
  28.             .RefreshStyle = xlInsertDeleteCells
  29.             .SavePassword = False
  30.             .SaveData = True
  31.             .AdjustColumnWidth = True
  32.             .RefreshPeriod = 0
  33.             .WebSelectionType = xlEntirePage
  34.             .WebFormatting = xlWebFormattingNone
  35.             .WebPreFormattedTextToColumns = True
  36.             .WebConsecutiveDelimitersAsOne = True
  37.             .WebSingleBlockTextImport = False
  38.             .WebDisableDateRecognition = False
  39.             .WebDisableRedirections = False
  40.             .Refresh BackgroundQuery:=False
  41.             If Application.CountA(.ResultRange) = 0 Then
  42.                 MsgBox Format(¤é´Á, "0000/00/00") & " ¥ð¥«!!!  ©Î  ªÑ²¼¥N¸¹:" & ªÑ²¼¥N¸¹ & " ¿ù»~ !!!"
  43.                 [A1].Select
  44.                 End
  45.             End If
  46.         End With
  47.         i = 2
  48.         Do
  49.             .Cells(Rows.Count, 1).End(xlUp).Offset(1).Select
  50.             With .QueryTables.Add(Connection:="URL;http://bsr.twse.com.tw/bshtm/bshtm_report_Messages.aspx?strDate=" & ¤é´Á & "&StartNumber=" & ªÑ²¼¥N¸¹ & "&FocusIndex=" & i, Destination:=Selection)
  51.                 .Name = ¤é´Á & "_" & ªÑ²¼¥N¸¹ & "_" & i
  52.                 .WebSelectionType = xlSpecifiedTables
  53.                 .WebFormatting = xlWebFormattingNone
  54.                 .WebTables = "6"
  55.                 .WebPreFormattedTextToColumns = True
  56.                 .WebConsecutiveDelimitersAsOne = True
  57.                 .WebSingleBlockTextImport = False
  58.                 .WebDisableDateRecognition = False
  59.                 .WebDisableRedirections = False
  60.               ''''''µLªk¬d¸ß®Éµy«Ý  ¨ì  A_Wait: '''''
  61.                 .Refresh BackgroundQuery:=False
  62.                 If Application.CountA(.ResultRange) = 0 Then GoTo Out
  63.                 i = i + 1
  64.             End With
  65.             A = CreateObject("WScript.Shell").popup("½Ðµ¥«á¤U¸ü..." & Chr(10) & Chr(10) & "** ½Ð¤Å«ö¤U ** [½T©w]", 4, ¤é´Á & "_" & .[F2] & "  ²Ä" & i & "­¶", 16 * 3 + 0)
  66.             Application.ScreenUpdating = True
  67.         Loop
  68. Out:
  69.         .UsedRange.Columns.AutoFit
  70.         .[A1].Select
  71.         A = CreateObject("WScript.Shell").popup("¦@¤U¸ü" & i & "­¶", 5, ¤é´Á & "_" & ªÑ²¼¥N¸¹, 48 + 0)
  72.         Application.StatusBar = "¦@¤U¸ü " & i & "­¶ ¶O®É " & Format(Time - T, "HH:MM:SS")
  73.     End With
  74.     End
  75. A_Wait:
  76.     Application.StatusBar = "µLªk¬d¸ßµ¥­Ô10¬íÄÁ"
  77.     Application.Wait Now + TimeValue("00:00:10")
  78.     Err.Clear
  79.     Application.StatusBar = False
  80.     Resume    '­«ªð¬d¸ß
  81. End Sub
½Æ»s¥N½X
¥H«e¥i¥H¤U¸ü¨ì...²{¦b¤U¤£¨ì¡A½Ð¨D°ª¤â¸Ñ´b

¦^´_ 2# chen_cook


    ÁÂÁ¡I­ì¨Ó°ÝÃD¤w¦³¤H¥ýµo²{

    ÀR«Ý°ª¤â¸Ñ¨M

TOP

¦^´_ 4# lalalada

³o¼Ë´NµLªk¤@¦¸¦Û°Ê¤U¸ü¤F¡I¬O¶Ü

TOP

¦^´_ 10# lalalada


    ½Ð°Ý­n¥[¨ì­þ¸Ì¡H³o¬qµ{¦¡....·|¤ñ¸û§Ö¶Ü¡H

TOP

GBKEE¤j¤j·PÁ§A¤À¨É¤W¥«¸ê®Æ§ì¨ú¤º½X....·P®¦¡I
¤WÂd¥i§_¤]½Ð§A¤À¨É§ì¨ú¤è¦¡
ÁÂÁ¡I

TOP

¦n¼F®`¡I¼F®`......
¦¨¥\¤F
µ¥«Ýª©¥D¤À¨É§¹¾ã¤U¸ü¤WÂd¸ê®Æ¤º½X
·P®¦

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD