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

[µo°Ý] ½Ð°Ý³o¥i³]©wµ¥´X¬í¨S¶}ºô­¶©Îºô­¶¿ù»~´N°õ¦æ¤U¤@µ§¶Ü¡AÁÂÁÂ

¥»©«³Ì«á¥Ñ quickfixer ©ó 2022-2-12 21:01 ½s¿è

¦^´_ 24# wufonna


    ª±¤F¤@¤U,·|¥X¿ù¬O¨S§ì¨ì¸ê®Æ,¦n¹³¬Oµ{¦¡¶]¤Ó§Ö,¬y¶q­­¨îªº°ÝÃD,¥i¬O¨S¾×ip?
µ{¦¡¨S°ÝÃD,¥t¥~°µ¤@­Ócommandbutton,¥þ³¡½s¸¹¶]§¹«á,¦A­«§ì¦³ªÅ¥Õªº¸ê®Æ
Sub test()
    With ¤u§@ªí1
        For i = 2 To .Range("A" & .Rows.Count).End(xlUp).Row
¥u§ì¨S¸ê®Æªº½s¸¹
           If .Cells(i, 3) = "" Then
            v = .Cells(i, 1).Value
            GetDividend (v)
'³o´X¦æcode ¦P AllFile ,®¤§R
           End If
        Next
    End With
End Sub

TOP

¥»©«³Ì«á¥Ñ quickfixer ©ó 2022-2-12 22:45 ½s¿è

¦^´_ 26# wufonna

¨Sª`·N¨ìSelectionChange¸Ì­±¦³­«§ìªºµ{¦¡½X

¥X¿ù®É    debug.print HTMLsourcecode.body.innerhtml ¥X²{³o­Ó,¨S¦³§ì¨ì¸ê®Æ


google httpcode=500
¦øªA¾¹ºÝ¿ù»~¦^À³
500 Internal Server Error
¦øªA¾¹ºÝµo¥Í¥¼ª¾©ÎµLªk³B²zªº¿ù»~¡C

¥i¯àµ{¦¡¶]¤Ó§Ö,¦P­Óip½Ð¨D¤Ó¦h,ºô­¶¨Ó¤£¤Î³B²z

TOP

¥»©«³Ì«á¥Ñ quickfixer ©ó 2022-2-12 23:14 ½s¿è

¦^´_ 27# quickfixer

§Ú°Ñ¦Ò§Aµ¹ªº01ºô§}686f,¥[¤J­«·s¤U¸ü¥\¯à,¥i¥þ³¡¶]§¹
  1. Private Sub GetDividend(ByVal ss As String)     '¨úªÑ§Qºô­¶ '2022/2/22 ´«³o¬qµ{¦¡½X ¦b https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=3 ªº21¼Ó
  2. Dim URL, HTMLsourcecode, GetXml, Table
  3. Dim i As Integer, j As Integer, r As Integer
  4. Set HTMLsourcecode = CreateObject("htmlfile")
  5. Set GetXml = CreateObject("msxml2.xmlhttp")
  6. URL = "http://pscnetinvest.moneydj.com.tw/z/zc/zch/zch_" & ss & ".djhtm"

  7. r = 0
  8. retry:
  9. On Error Resume Next

  10. With GetXml
  11. .Open "GET", URL, False
  12. .setRequestHeader "Cache-Control", "no-cache"
  13. .setRequestHeader "Pragma", "no-cache"
  14. .setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"
  15. .send

  16. HTMLsourcecode.body.innerhtml = .responsetext
  17. Set Table = HTMLsourcecode.all.tags("table")(2).Rows

  18. If Err.Number <> 0 Then

  19. If r > 3 Then
  20. '¶W¹L3¦¸,§ï§ì¤U¤@µ§,ÁקKµL­­loop
  21. Exit Sub
  22. End If
  23. Debug.Print Err.Description
  24. r = r + 1
  25. On Error GoTo -1
  26. Err.Clear
  27. 'µ¥0.5¬í
  28. Delaytick (0.5)
  29. GoTo retry

  30. End If
  31.             
  32. For i = 0 To Table.Length - 1
  33. For j = 0 To Table(i).Cells.Length - 1
  34. ¤u§@ªí2.Cells(i + 1, j + 1) = Table(i).Cells(j).innertext
  35. Next j
  36. Next i
  37. End With
  38. Set HTMLsourcecode = Nothing
  39. Set GetXml = Nothing
  40. End Sub



  41. Sub Delaytick(setdelay As Single)
  42.    
  43.     Dim StartTime As Double, NowTime As Double
  44.     StartTime = Timer * 100
  45.     setdelay = setdelay * 100
  46.     Do
  47.       NowTime = Timer * 100
  48.       DoEvents
  49.     Loop Until NowTime - StartTime > setdelay
  50.    
  51. End Sub
½Æ»s¥N½X
¦ý¬O§Aallfile¸Ì­±¨º­ÓSplit(Date, "/")(1) - 1
¥i¯à­n§ï¤@¤U,¦³¤Hexcel¤é´Á¬O¥Î-¤£¬O/
¥Îmid¥i¯à·|¤ñ¸û¦n¤@¨Ç

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD