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

½Ð°Ý¦p¦ó±Nºô­¶ªº¹Ï¤ù¦sÀÉ

¦^´_ 10# wufonna

§AªºªþÀÉ
´¡¤Jªº¹Ï¤ù»Ý¨Ï¥Îø¹Ïªº¹Ï¤ù
¤@¼Ë§AªºªþÀÉ ªº¹Ï¤ù¨S§ï¦WºÙ¬° "ÅçÃÒ¹Ï"
µ¹§A°£¿ùµ{¦¡½X
  1. Private Sub ¹Ï§Î§ó·s()
  2.    On Error GoTo ER
  3.     If IE Is Nothing Then Get_Ie
  4.     If Msg Then MsgBox "ÅçÃÒ¹Ï §ó·s§¹²¦"
  5.     Msg = False
  6.     With IE
  7.         .Refresh
  8.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  9.         ºô¸ô¹Ï¤ù¦sÀÉ .Document.ALL.tags("IMG")(0).href
  10.     End With
  11.     MsgBox ¤u§@ªí1.Shapes("ÅçÃÒ¹Ï").Name
  12.    
  13.     ¤u§@ªí1.Shapes("ÅçÃÒ¹Ï").Fill.UserPicture ¹Ï§Î    '
  14.   Exit Sub
  15. ER:
  16.     MsgBox Err & vbLf & Err.Description
  17.     Stop
  18.     MsgBox ¤u§@ªí1.Shapes(1).Name
  19.     Resume
  20. End Sub

½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 11# GBKEE
GBKEE ¤j¤j
2010ª©ªº§ä¤£¨ì¹Ï¤ù¦p¦ó§ó¦W¡A
³oµ{¦¡¬O­n¥ý¬Ý¹Ï¤ùªº¦r¦A¿é¤J F2 ©M f4 ¤~¥i¿é¥X¶Ü
µ{¦¡ÁÙ¤£²M·¡¡A¬ã¨s¬Ý¬Ý ¤£·|¦A½Ð±Ð ¤j¤j
ÁÂÁ  GBKEE ª©¤j

¬¡­¶Ã¯1.rar (29.42 KB)

TOP

¦^´_ 11# GBKEE

ÁÂÁÂ GBKEE ¤j¤j
* ¨Ï¥Îø¹Ïªº¹Ï¤ù
¥i¥H¤F ^_^

2014-12-13_192543.jpg (70.4 KB)

2014-12-13_192543.jpg

TOP

¦^´_ 12# wufonna
2010ª©ªº§ä¤£¨ì¹Ï¤ù¦p¦ó§ó¦W
¦p¹Ï ¨ì¦WºÙ¤è¶ô¤¤­×§ï






VBA­×§ï
  1. With ¤u§@ªí1
  2.     .Shapes(1).Name = "ÅçÃÒ¹Ï"
  3.     .Shapes("ÅçÃÒ¹Ï").Fill.UserPicture ¹Ï§Î    '
  4. End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# GBKEE



½Ð°Ý,¸Ó¦p¦ó¸ü¤J¨ä¥L­¶¦¸
­Y¤£¥Î¼g¤JExcel,¦Óª½±µ .Click ¤U¸üCSVÀÉ(BIG5) ÀÉ®×
»yªk¸Ó«ç»ò­×¥¿
  1.         Set aa = .Document.getElementsByTAGName("INPUT")
  2.         For R = 0 To aa.Length - 1
  3.             If aa(R).Value = "¤U¸üCSVÀÉ(BIG5)" And aa(R).Type = "button" Then
  4.                 aa(R).Click   '¦³ "¤U¸üCSVÀÉ(BIG5)" ªº«ö¶s
  5.                     Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
  6.             End If
  7.         Next
½Æ»s¥N½X

TOP

¦^´_ 14# GBKEE

­ì¨Ó´N¦b­±«e «¢
ÁÂÁÂ GBKEE ¤j¤j

TOP

¥»©«³Ì«á¥Ñ wufonna ©ó 2014-12-14 15:09 ½s¿è

¦^´_ 14# GBKEE


    ½Ð°Ý ¤j¤j ²Ä¤@¬q¹ïÀ³ªº¬O³oµ{¦¡½X¶Ü¡A¨º²Ä¤G¬qªº§Ú³o¼Ë§ï¬°¦ó¬dµL¸ÓªÑ²¼¥N½X¸ê®Æ
½Ñ°Ý ¤j¤j ¦p¦ó¦³»~¡A§ï¦p¦ó°µ½m²ß¡AÁÂÁÂ


<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;¬d¸ß</button>

      Set a = .Document.ALL.tags("BUTTON")
        For Each e In a
            If Trim(e.innertext) = "¬d¸ß" And e.ID = "" Then
            e.Click
            Exit For
            End If
        Next

<input type="radio" id="rdo_search_stk" tabindex="14" name="rdo_search" value="1" class="input-radio-search" checked><span>­ÓªÑ¬d¸ß</span>
<button id="header_search_btn" tabindex="17" class="input-button ui-corner-all" tabindex="13">·j´M</button>       

Sub test()
Dim e As Object, a As Object
    Set IE = CreateObject("InternetExplorer.Application")
   
    With IE
        .Visible = True
        '¨é°Ó¶R½æÃÒ¨é¤é³øªí¬d¸ß¨t²Î¡]¤@¯ë¥æ©ö¡^
        .Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
        Do While .Busy Or .readyState <> 4: DoEvents: Loop
        .Document.ALL.tags("INPUT")("rdo_search_stk").Value = 1
        .Document.ALL.tags("INPUT")("input_search_site").Value = Trim(1258)
        Set a = .Document.ALL.tags("BUTTON")
        For Each e In a
        If e.ID = "header_search_btn" Then
            e.Click
            Exit For
        End If
        Next
    End With
End Sub

TOP

¦^´_ 14# GBKEE


    ÁÂÁ GBKEE ª©¤j
   ¬O§Ú¬Ý¿ù¤F
   
        .Document.ALL.tags("INPUT")("input_search_stk").Value = Trim(1258)

TOP

¦^´_ 15# HSIEN6001

­Y¤£¥Î¼g¤JExcel,¦Óª½±µ .Click ¤U¸üCSVÀÉ(BIG5) ÀÉ®×
¹ïIEªº¯AÂy©|²L§ä¤£¥X¤U¸üCSVÀɪº°Ñ¼Æ,¦³½Ð°ª¤â«üÂI

¸ü¤J¨ä¥L­¶¦¸
Dim IEx As Object  '¤u§@ªí¼Ò²Õ
  1. Private Sub ¤é³øªí¸ü¤J()
  2.     Dim e As Object, A As Object, k  As Integer, i As Integer, S As String
  3.     If IE Is Nothing Then
  4.         ¹Ï§Î§ó·s
  5.         MsgBox "ÅçÃҹϤw§ó·s"
  6.         Exit Sub
  7.     End If
  8.     With IE
  9.         .Document.all.tags("INPUT")("stk_code").Value = Range(ÃÒ¨é¥N¸¹)
  10.         .Document.all.tags("INPUT")("auth_num").Value = Trim(Range(ÅçÃÒ½X))
  11.         Set A = .Document.all.tags("BUTTON")
  12.         For Each e In A
  13.             If Trim(e.Innertext) = "¬d¸ß" And e.ID = "" Then
  14.             e.Click
  15.             Exit For
  16.             End If
  17.         Next
  18.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  19.         UsedRange.Offset(6).Clear
  20.         Range("a" & k + 1) = S
  21.         If .Document.body.Innertext Like "***¸ÓªÑ²¼¸Ó¤éµL¥æ©ö¸ê°T***" Then S = "***¸ÓªÑ²¼¸Ó¤éµL¥æ©ö¸ê°T***"
  22.         If .Document.body.Innertext Like "***ÅçÃÒ½X¿ù»~¡A½Ð­«·s¬d¸ß¡C***" Then S = "***ÅçÃÒ½X¿ù»~¡A½Ð­«·s¬d¸ß¡C*** "
  23.         If S <> "" Then
  24.             Range("a" & k + 1) = S
  25.             MsgBox S
  26.             GoTo NN
  27.         End If
  28.         Set IEx = CreateObject("InternetExplorer.Application")
  29.         IEx.Navigate "about:Tabs"
  30.         Set A = .Document.all.tags("A")
  31.         ³æ­¶¸ü¤J .Document.all.tags("table")(0).outerHTML
  32.         [A6].Select
  33.         '********µ{¦¡½X¼g¦b¤u§@ªí¼Ò²Õ: Me «ü³o¤u§@ªí¼Ò²Õ
  34.         Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  35.         '****************************************
  36.         If A.Length = 459 Then
  37.             For i = 2 To 3
  38.                 ³æ­¶¸ü¤J .Document.all.tags("table")(i).outerHTML
  39.                 With Range("A" & Rows.Count).End(xlUp).Offset(1)
  40.                     .Select
  41.                     Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  42.                 End With
  43.             Next
  44.         Else
  45.             For k = 0 To A.Length - 1
  46.                 If Val(A(k).Innertext) >= 1 Then
  47.                     Debug.Print A(k).Innertext
  48.                     A(k).Click
  49.                     Do While .Busy Or .readyState <> 4: DoEvents: Loop
  50.                     Set A = .Document.all.tags("A")
  51.                     Do While .Busy Or .readyState <> 4: DoEvents: Loop
  52.                     For i = 2 To 3
  53.                         ³æ­¶¸ü¤J .Document.all.tags("table")(i).outerHTML
  54.                         With Range("A" & Rows.Count).End(xlUp).Offset(1)
  55.                             .Select
  56.                             Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
  57.                         End With
  58.                     Next
  59.                 End If
  60.             Next
  61.         End If
  62.         IEx.Quit
  63.         Set IEx = Nothing
  64.         ¾ã²z
  65. NN:
  66.         .Quit
  67.     End With
  68.     Set IE = Nothing
  69.     ¹Ï§Î§ó·s
  70. End Sub
  71. Private Sub ³æ­¶¸ü¤J(S)
  72.     With IEx
  73.         .Document.body.innerHTML = S
  74.         .ExecWB 17, 2       '  Select All
  75.         .ExecWB 12, 2       '  Copy selection
  76.     End With
  77. End Sub
  78. Private Sub ¾ã²z()
  79.     On Error Resume Next
  80.     Application.EnableEvents = False
  81.     With UsedRange.Offset(10)
  82.         .Replace "§Ç¸¹", "=ex", xlWhole
  83.         .SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.Delete
  84.     End With
  85.     UsedRange(1).Select
  86.     Application.EnableEvents = True
  87. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 19# GBKEE

­C!¦¨¤F

ÁÂÁ±zªº«ü¾É¡I
µ{¦¡»y¨¥¡A³Õ¤jºë²`
¹ï§Ú¨Ó»¡«ÜÁ}Ãø¡A¦]¬°¦n¥Î¡AÁÙ¬O«Ü§V¤OªººÉ¶q¦h§l¦¬¤@¨Ç
ÁÙ¨S¬ÝÀ´ªº³¡¤À¡A¤]¥ý¦¬¶°°_¨Ó¡A«Ý¤é«á®ø¤Æ

~·P®¦~

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD