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

[¤À¨É] ¤j½L¨C¤ë¨C¤Ñ¾ú¥v¦¨¥æ¶q»Pª÷ÃB¤U¸ü

¦^´_ 72# GBKEE
  1. Option Explicit
  2. Private Sub ¤j½L¦¨¥æ¸ê°T()
  3.     Dim xlTheYear As String, xlTheMonth As String, STK_NO As String, xlTheFile As String
  4.     Dim Sh As Worksheet
  5.     xlTheYear = Format(Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
  6.     xlTheMonth = Format(Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
  7.     STK_NO = Format(Range("C3"), "0000")  '­×§ï¦r¦ê®æ¦¡
  8.     Set Sh = ThisWorkbook.Sheets.Add         '·s¼W¤u§@ªí
  9.     Sh.Name = xlTheYear & "_" & xlTheMonth   '·s¼W¤u§@ªí©R¦W
  10.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  11.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
  12.     With Workbooks.Open(xlTheFile)
  13.         .Sheets(1).UsedRange.Copy Sh.[a1]
  14.         .Close 0
  15.     End With
  16.     Sh.Cells.EntireColumn.AutoFit            '½Õ¾ãÄæ¼e
  17.     Sh.Columns("A:A").ColumnWidth = 28.56
  18. End Sub
½Æ»s¥N½X
ª©¤j
§Ú©w¸q¤FSTK_NO(ªÑ²¼¥N½X)
¥i¬O¶]¤£¥X¨Ó

TOP

¦^´_ 71# pupai
'http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php ³oºô§}¥i¤U¸üÀɮצý¤£¬OcsvÀÉ,§A¥i¥H¸Õ¤U¸ü¬Ý¬Ý
§Aªººô§}¤Ö¤F STK_NO (ªÑ²¼¥N¸¹)
  1. xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & Stk_No & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
  2.     xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & Stk_No & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ pupai ©ó 2013-9-19 16:06 ½s¿è
¦^´_  turbine
GBKEE µoªí©ó 2012-10-2 10:52



    ½Ð±ÐGBKEEª©¤j
¨Ì·Ó±zªº¤è¦¡,¦pªGºô­¶´«¦¨³o¤@­Ó http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php
­n¦p¦ó­×§ï©O

Option Explicit
Private Sub ¤j½L¦¨¥æ¸ê°T()
    Dim xlTheYear As String, xlTheMonth As String, xlTheFile As String
    Dim Sh As Worksheet
    xlTheYear = Format(Range("C1"), "0000")  '­×§ï¦r¦ê®æ¦¡
    xlTheMonth = Format(Range("C2"), "00")   '­×§ï¦r¦ê®æ¦¡
    Set Sh = ThisWorkbook.Sheets.Add         '·s¼W¤u§@ªí
    Sh.Name = xlTheYear & "_" & xlTheMonth   '·s¼W¤u§@ªí©R¦W
    xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
    With Workbooks.Open(xlTheFile)
        .Sheets(1).UsedRange.Copy Sh.[a1]
        .Close 0
    End With
    Sh.Cells.EntireColumn.AutoFit            '½Õ¾ãÄæ¼e
    Sh.Columns("A:A").ColumnWidth = 28.56
End Sub

TOP

·Q½Ð°Ý°O¾ÐÅ餣¨¬¡A³o¬O­n¦p¦ó¸Ñ¨Mªü!!!

TOP

¦^´_ 68# GBKEE


   ¹ï¤F¡A´N¬O³o¼Ë¡A«D±`·PÁÂ

TOP

¦^´_ 67# 198188
¬O³o¼Ë¶Ü?
  1. Option Explicit
  2. Sub EX()
  3.     '
  4.     '
  5.     Set Rng = .[A2]  '²Ä¤@­ÓRng
  6.     '
  7.     '
  8.     'Set Rng = .[A101]  '²Ä¤G­ÓRng
  9.     '²Ä¤G­ÓRng§ï¦¨¦p¦¹²Ä¤@­ÓRng©¹¤U¨ì¦³¸ê®Æªº¤U¤@¦C
  10.     Set Rng = Rng.End(xlDown).Offset(1)  '²Ä¤G­ÓRng
  11.     '
  12.     '
  13.     'Set Rng = .[A151]  '²Ä¤T­ÓRng
  14.     '²Ä¤T­ÓRng§ï¦¨¦p¦¹²Ä¤G­ÓRng©¹¤U¨ì¦³¸ê®Æªº¤U¤@¦C
  15.     Set Rng = Rng.End(xlDown).Offset(1) '²Ä¤T­ÓRng
  16.     '
  17.     '
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 66# GBKEE


    ÁÂÁ¡C
¦ý¬O¥i¥HÅý¥¦¦Û°Ê¿ë»{³Ì«á¤@µ§¶Ü¡H
¦]¬°§Ú­ncopyªº¤T­Óexcel¡A¨C¤Ñ³£¦³¥[¸ê®Æ¤W¦¸¡A©Ò¥H»Ý­n¥¦¦Û¤v¿ë»{­ncopyªº¸ê®Æ¦³¦h¤Öµ§¡AµM«á²Ä¤G­Ó´N±q²Ä¤@­Óªº³Ì«á¤@µ§¤§«á¤@¦C¦A¶}©lcopy

TOP

¦^´_ 65# 198188
¦¹¦^ÂÐ:¤w¬O°¾Â÷³o¥DÃD,¥H«á½Ð¦b¦³¬ÛÃöªº¥DÃD¤¤µo°Ý
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.    Dim Rng As Range
  4.    'With Workbooks.Open("C:\USER\DESTOP\E.XLSX").Sheets("2012") 'ÀÉ®×¥¼¶}±Ò®É¥Î¦¹µ{¦¡½X
  5.    With Workbooks("E.XLSX").Sheets("2012")                      'Àɮפw¶}±Ò®É¥Î¦¹µ{¦¡½X
  6.         'A2:AM2 to A100:AM100 ¬OY:\2012\A.XLSX (2012) ªº¸ê®Æ
  7.         Set Rng = .[A2]
  8.         With Workbooks.Open("Y:\2012\A.XLSX").Sheets("2012")    'Àɮ׶}±Ò
  9.             .[A100:AM100].Copy Rng
  10.            .Parent.Close False                                  'ÀÉ®×Ãö³¬
  11.         End With
  12.         'A101:AM101 to A150:AM150¬OC:\2012\B.XLSX (Nov)ªº¸ê®Æ
  13.         Set Rng = .[A101]
  14.         With Workbooks.Open("Y:\2012\A.XLSX").Sheets("Nov")    'Àɮ׶}±Ò
  15.             .[A150:AM150].Copy Rng
  16.            .Parent.Close False                                  'ÀÉ®×Ãö³¬
  17.         End With
  18.         'A151:AM151 to A270:AM270¬OZ:\2012\C.XLSX (2012) ªº¸ê®Æ
  19.         Set Rng = .[A151]
  20.         With Workbooks.Open("Y:\2012\A.XLSX").Sheets("2012")    'ÀÉ®×¥¼¶}±Ò
  21.             .[A270:AM270].Copy Rng
  22.            .Parent.Close False                                  'ÀÉ®×Ãö³¬
  23.         End With
  24.     End With
  25. End Sub
½Æ»s¥N½X

TOP

¦^´_ 64# GBKEE


    «D±`·PÁÂ~§Ú¤]ª¾¹D³o­Ó·Qªk«ÜÃø°µ¨ì¡C
¥t¥~§Ú·Q°Ý¥i§_¦P®É±N¤T­Ó¤£¦Pexcel¦W¤ºªºsheet copy ¦b¥t¤@­Ósheet¤W
¨Ò¦p¡G
Y:\2012\A.XLSX (2012)
C:\2012\B.XLSX (Nov)
Z:\2012\C.XLSX (2012)

copy¦b
C:\USER\DESTOP\E.XLSX (2012)
¨C¦¸copy³£·|­«·s±qA2 : AM2 ¨ì³Ì«áªº¸ê®Æcopy¤U¥h (³Ì«áªº¸ê®Æ¨º¦C¨C¦¸³£¤£¦P¡^
¨Ò¦p¡G
Y:\2012\A.XLSX (2012) ªº¸ê®Æ¨ì±qA2:AM2 to A100:AM100
C:\2012\B.XLSX (Nov) ªº¸ê®Æ¨ìA2:AM2 to A50:AM50
Z:\2012\C.XLSX (2012) ªº¸ê®Æ¨ìA2:AM2 to A120:AM120
¨º»òcopy¥X¨Óªº®ÄªG¬O
A2:AM2 to A100:AM100 ¬OY:\2012\A.XLSX (2012) ªº¸ê®Æ
A101:AM101 to A150:AM150¬OC:\2012\B.XLSX (Nov)ªº¸ê®Æ
A151:AM151 to A270:AM270¬OZ:\2012\C.XLSX (2012) ªº¸ê®Æ
²Ä¤G¦¸«ö·|²M·¡¤§«eªº¸ê®Æ¦A±qA2 : AM2¶}©l¡A¨C¦¸³£³o¼Ë

TOP

¦^´_ 62# 198188
©êºp¥u¯àÀ°¨ì [³fÂd¸¹½Xµn¿ý] ³o¸Ì
³ohttp://www.maerskline.com/appmanager/maerskline/public?_nfpb=true&_nfls=false&_pageLabel=page_tracking3_trackSimpleºô­¶
ªº³fª«¸ê®Æ,¤@ª½µLªk¤U¸ü¨ìExcel
  1. Option Explicit
  2. Sub ³fÂd¸¹½Xµn¿ý()
  3.    Dim IE As New InternetExplorer, i As Integer, vDoc As Object
  4.     '«Å§i Dim ie As New InternetExplorer
  5.     '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Internet Controls
  6.     'Set IE = CreateObject("InternetExplorer.Application")
  7.     'Dim i As Integer, vDoc As Object
  8.     With CreateObject("InternetExplorer.Application") '¤£»Ý·s¼W¤Þ¥Î Microsoft Internet Controls
  9.     'With IE
  10.         .Visible = True
  11.         .Navigate "http://www.maerskline.com/appmanager/"
  12.         Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
  13.         Set vDoc = .Document.getElementsByTagName("INPUT")
  14.         For i = 0 To vDoc.Length - 1
  15.             If vDoc(i).Name = "portlet_quickentries_2{actionForm.trackNo}" Then vDoc(i).Value = "PONU4867818"  '³fÂd¸¹½X
  16.             If vDoc(i).Value = "Track" Then vDoc(i).Click               '«ö¤U½T©w
  17.         Next
  18.     End With
  19. End Sub
½Æ»s¥N½X


    ¦^´_ 63# 198188
21 # stillfish00 ¤w´£¥X­×¥¿ ,§A¸Õ¸Õ¬Ý,¯u¤£¦æ¦A»¡

TOP

        ÀR«ä¦Û¦b : ­×¦æ­nô½t­×¤ß¡AÂǨƽm¤ß¡AÀH³B¾i¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD