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

[µo°Ý] ±q¤½¶}Æ[´ú¯¸§ì¤W¥«¤½¥qEPS

[µo°Ý] ±q¤½¶}Æ[´ú¯¸§ì¤W¥«¤½¥qEPS

¤j®a¦n

½Ð°Ý°õ¦æ³oµ{¦¡«e8®a¤½¥q§ìEPS³£«Ü¶¶¡A¨ì²Ä¤E®a¹L«á´NÅܪºªÅ¥Õ¡A¬O­þ¸Ì¥X¤F°ÝÃD¡H½Ð¦U¦ì¨ó§UÀ°¦£¡C

ÁÂÁ¤j®a
BigDog

Á`ªí.rar (176.52 KB)

¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

¦^´_ 1# BigDog


1. ¸ÓWEB SERVER­­¨î¤@¤ÀÄÁŪ¨ú20¦¸¡A²Ä21¦¸´N·|¥X²{¡u¨t²Î¬y¶q¤j¡A½Ðµy«á¦A¬d¸ß!¡v
2. ¥[­Ó­p¼Æ¾¹¡AŪ20¦¸«á¼È°±1¤ÀÄÁ¦A§ì...
diabo

TOP

¦^´_ 2# diabo


¶W·PÁÂd¤jªº«ü¾É¡A¥u¬O·Q¦A½Ð±Ð¤@­Ó°ÝÃD¡A
Ãö©óweb server¦p¦ó±oª¾¦³µL¸ü¤J¦¸¼Æ­­¨î¡A¸Ó±q­þ¸Ì±oª¾¡HÁÂÁÂd¤j.:loveliness:
¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-10-2 13:08 ½s¿è

¦^´_ 1# BigDog
¥þ¤åÀ˯Á¤¤·j´M ºô¸ô³s½u

§@·~¨t²Î Windows NT ¥B ºô¸ôIP ¬O¯B°ÊIP
  1. Sub ½m²ß()
  2.     Dim motoSht As Worksheet, sakiSht As Worksheet, sakiRng As Range
  3.     Dim motoHani()                                     '«Å§iÅܼÆ
  4.     Set motoSht = Worksheets("°]°È¤ÀªR")               '³]©w­Ó§O°]°È¤ÀªR¤u§@ªí
  5.     Set sakiSht = Worksheets("¤W¥«")                             '³]©wÀx¦s¥þ³¡¤W¥«¤u§@ªí
  6.     motoSht.Range("A1:T21") = ""
  7.     For Each E In motoSht.Names                             ' §R°£ QueryTables
  8.         E.Delete
  9.     Next
  10.     '±N·Q­nÂà¼g¤§Àx¦s®æªº¦ì¸mÀx¦s¦b°}¦C¤¤
  11.     motoHani = Array("C18", "D18", "E18", "H18", "I18", "J18", "M18", "N18", "O18", "T18")
  12.     '¨ú±o¤ÀªRµ²ªG¦Ü¤W¥«Á`ªíªº¿é¤J¦ì¸m
  13.     motoaddress = Array("A1", "f1", "k1", "p1")
  14.     motoyear = Array(93, 96, 99, 100)
  15.     '¨ú±o¸ü¤J°]°È¤ÀªR¤Î¦~«×¸ê®Æ¦ì¸m
  16.     motoRowcon = sakiSht.Range("a1").CurrentRegion.Rows.Count
  17.     '¨ú±o¤W¥«Á`¦C¼Æ
  18.     For i = 2 To motoRowcon
  19.         motoSht.Cells(25, 1) = sakiSht.Cells(i, 1)
  20.         For x = 0 To 3
  21. RE:
  22.         Application.StatusBar = False
  23.     With motoSht.QueryTables.Add(Connection:= _
  24.         "URL;http://mopsov.twse.com.tw/server-java/t05st22?colorchg=1&off=1&TYPEK=sii&isnew=false&year=" & motoyear(x) & "&co_id=" & motoSht.Range("A25") & "&" _
  25.         , Destination:=motoSht.Range(motoaddress(x)))
  26.         .Name = _
  27.         "t05st22?colorchg=1&off=1&TYPEK=sii&isnew=false&year=100&co_id=1733&"
  28.         .FieldNames = True
  29.         .RowNumbers = False
  30.         .FillAdjacentFormulas = False
  31.         .PreserveFormatting = True
  32.         .RefreshOnFileOpen = False
  33.         .BackgroundQuery = True
  34.         .RefreshStyle = xlInsertDeleteCells
  35.         .SavePassword = False
  36.         .SaveData = True
  37.         .AdjustColumnWidth = True
  38.         .RefreshPeriod = 0
  39.         .WebSelectionType = xlSpecifiedTables
  40.         .WebFormatting = xlWebFormattingNone
  41.         .WebTables = "4"
  42.         .WebPreFormattedTextToColumns = True
  43.         .WebConsecutiveDelimitersAsOne = True
  44.         .WebSingleBlockTextImport = False
  45.         .WebDisableDateRecognition = False
  46.         .WebDisableRedirections = False
  47.        .Refresh BackgroundQuery:=False
  48.        If Application.Count(.ResultRange) = 0 Then   '¨ì²Ä¤E®a¹L«á´NÅܪºªÅ¥Õ
  49.             Application.StatusBar = "µ¥­Ôºô­¶¤¤...."
  50.             ­«±Ò³s½u
  51.             GoTo RE
  52.         End If
  53.     End With
  54.     Next
  55.     For j = 0 To UBound(motoHani)
  56.         sakiSht.Cells(i, 25).Offset(0, j).Value = motoSht.Range(motoHani(j)).Value
  57.     Next
  58.     motoSht.Range("A1:T21") = ""
  59.     For Each E In motoSht.Names
  60.         E.Delete
  61.     Next
  62. Next
  63. '±N­Ó§O¸ê®Æ±a¤J¤W¥«Á`ªí
  64. MsgBox "¿é¤J§¹²¦¡C"
  65. End Sub
  66. Sub ­«±Ò³s½u()
  67.    ' ¦¹µ{¦¡§@¥Î:¤¤Â_ºô¸ô³s½u¦A«×³s½u­«·s¨úªººô¸ôIP,¥H­«·s¨ú±o WEB SERVER­­¨î ¤@¤ÀÄÁŪ¨ú20¦¸
  68.     'ºô¸ô³s½u ªº¦WºÙ adsl ½Ð­×§ï¬° §APC ¤W¥¿½T¦WºÙ
  69.     'res = Shell("rasphone.exe [-d *****]", 1)
  70.     res = Shell("rasphone.exe [-d adsl]", 1)
  71.     AppActivate res, True
  72.     SendKeys "%(U)", True
  73.     Application.Wait Now + #12:00:01 AM# '©µ¿ðµ¥­Ôµ{¦¡³B¸Ì
  74.   
  75.     SendKeys "%(Y)", True
  76.     Application.Wait Now + #12:00:01 AM#   '©µ¿ðµ¥­Ôµ{¦¡³B¸Ì
  77.   
  78.     SendKeys "%(C)", True
  79.     Application.Wait Now + #12:00:01 AM#   '©µ¿ðµ¥­Ôµ{¦¡³B¸Ì
  80.   
  81.     SendKeys "%(C)", True
  82.     Application.Wait Now + #12:00:02 AM#      '©µ¿ðµ¥­Ô¦±µ{¦¡³B¸Ì
  83. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


    ·PÁª©¤jªº¦^ÂÐ ¡A ¦¬¤U¨Ó¦n¦n¬ã¨s¤@µf¡AÁÂÁ¡I
¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

TOP

¦^´_ 4# GBKEE

motoSht.Range("A1:T21") = ""      
½Ð°Ý¥Î¦b¤°»ò¦a¤è¡HÁÂÁª©¤jªº±Ð¾É...
¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

TOP

¦^´_ 4# GBKEE


    ¥t¥~½Ð°Ý¤@­Ó°ÝÃD¡A¬°¤°»òmotoSht.Names¦³³o»ò¦h­Ó¦W¦r¡A«ç»ò²£¥Íªº¡HÁÂÁª©¤j¡I   
        For Each E In motoSht.Names                             ' §R°£ QueryTables
        MsgBox E.Name
        E.Delete
¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

TOP

¦^´_ 7# BigDog
With motoSht.QueryTables.Add(Connection:=  "URL;http://mopsov.twse.com.tw/server-java/t05st22?colorchg=1&off=1&TYPEK=sii&isnew=false&year=" & motoyear(x) & "&co_id=" & motoSht.Range("A25") & "&" _
        , Destination:=motoSht.Range(motoaddress(x)))
motoSht.Range("A1:T21") = ""   ¥Î¥H²M°£ motoSht.Range(motoaddress(x)
        .Name = "t05st22?colorchg=1&off=1&TYPEK=sii&isnew=false&year=100&co_id=1733&"
¬°¤°»òmotoSht.Names¦³³o»ò¦h­Ó¦W¦r QueryTable Add ²£¥Í¤@¦WºÙ  

TOP

¤§«e¤]¬O³£¥Îwait µ¥«Ý , ­ì¨ÓÁÙ¦³­«·s³s½uºô¸ô³oºØ¤èªk¥hÁ×¹L³á
°½¾Ç¨ì¤@©Û~

TOP

¦^´_ 8# GBKEE


    ©çÁ¡I¦A½Ð°Ýª©¤j¤@­Ó°ÝÃD¡A¬°¤°»ò­n§R°£NAME¡A¤£§R°£°õ¦æ·|¦³¤°»ò°ÝÃD¶Ü¡HÁÂÁ¡I
¥Î²³æªº¤ß°µ½ÆÂøªº¨Æ

TOP

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