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

Ãö©ó³sÄò°õ¦æ

Ãö©ó³sÄò°õ¦æ

½Ð°Ý¦U¦ì¤j¤j
¦pªG§Ú¦ba1~a10³£¦³¸ê®Æ
µM«á·QÅý¬Y¤@­Ó¥¨¶°¥h¶]a1~a10
¦ý¬O¤£¬O¨C¦¸a10³£¬O³Ì«á¤@µ§
½Ð°Ý³o¼Ë¸Ó«ç»ò¼gvba©O

·PÁ§Aªº«üÂI

¦^´_ 1# vavashop

Dim lRow&
  lRow = 1
  While Cells(lRow, 1) <> ""

    ' »Ý­n³v®æ³B²zªºµ{§Ç©ñ¦b³o¸Ì

    lRow=lRow+1
  Wend

TOP

¤èªk¤@¡G
Dim R&
R = Cells(Rows.Count, 1).End(xlUp).Row¡@'¨ú±o¢éÄæ³Ì«á¤@µ§¸ê®Æ¡e¦C¸¹¡f
For i = 1 To R
¡@¡@³B²zµ{§Ç
Next

¤èªk¤G¡G
Dim xR As Range
For Each xR In Range([A1], Cells(Rows.Count, 1).End(xlUp))
¡@¡@³B²zµ{§Ç
Next

¡ÄCells(Rows.Count, 1).End(xlUp)¡@¡Ö¡@¨ú±o¢éÄæ³Ì«á¤@µ§¸ê®Æ¡eÀx¦s®æ¡f¡@
¡@
¡@

TOP

¦^´_ 3# ­ã´£³¡ªL



¤j¤j¥i¥H½Ð¨D¨ó§U¤@¤U³oºô¯¸
http://www.twse.com.tw/ch/trading/fund/T86/T86.php

§Ú­ì¥»ªºvba
¥i¥H§ì¨ú²{¦b«oÅܦ¨¤£¦æ¤F

Sub §ó·s¤W¥«¤T¤jªk¤H1_1()
'
' ¥¨¶°1 ¥¨¶°
' ÂI¿ï¤W¥«¤À­¶ ¦A¨ì²M°£¤W¥«¿Ä¸ê ¦A¦^¨ì ¤W¥«½Æ»s¤é´Á ¶K¦^¤W¥«¿Ä¸ê -->°õ¦æÀɮפU¸ü
'

'
    Dim xDate As Date, genpage As String, qdate As String, Print_php As String, Wb As Workbook
   
    '1 ¦p¤£¥i¬d¸ß·í¤é ¤T¤jªk¤H¶R½æ¶W¤é³ø
    xDate = Date - 0  '0§ï¬°1Åܦ¨ «e¤@¤Ñ
   
   
    Do While Weekday(xDate, vbMonday) >= 6
        xDate = xDate - 0  '0§ï¬°1Åܦ¨ «e¤@¤Ñ
   
    Loop
   
    '¦p©ó¤@©wªº®É¶¡«á¥i¬d¸ß·í¤éªº ¤T¤jªk¤H¶R½æ¶W¤é³ø
    '½Ð§R°£ ** xDate = Date - 1 **
   
   
    '2 °õ¦æ¤U­±ªºµ{¦¡½X,¨ú®øµù¸Ñ ** ' **
   
    'If xDate = Date And Time < #5:00:00 PM# Then
    '    xDate = xDate - 1
    'End If
   
    For Each Wb In Workbooks
        If Trim(Wb.Name) = "print.php" Then Wb.Close False
        '¤U¸üCSV ªº¦WºÙ¬° Print_php ¥²¥ýÃö³¬
    Next
    genpage = Format(xDate, "yyyymm/yyyymmdd")
    qdate = Format(xDate, "yyyymmdd")
    Print_php = "http://www.twse.com.tw/ch/trading/fund/T86/print.php?edition=ch&filename=genpage/" _
             & genpage & "_2by_issue.dat&type=csv&select2=ALLBUT0999&qdate=" & qdate

     Set Wb = Workbooks.Open(Print_php)
     

  
     
  
     
End Sub

TOP

·PÁ¨â¦ì¤j¤j
a1~a10ªº°ÝÃD¸Ñ¨M¤F

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD