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

½Ð°Ý«ç»ò±NAÄ檺¼Æ¦r¥N¤J, ¬d¸ßºô­¶

½Ð°Ý«ç»ò±NAÄ檺¼Æ¦r¥N¤J, ¬d¸ßºô­¶

½Ð°Ý¤@¤U.....
§ÚªºAÄæ¬OªÑ²¼¥N¸¹(´X¤Q­Ó), ·Q¥Ñ¶®ªê¬d¸ßªÑ»ù
http://tw.stock.yahoo.com/q/q?s=ªÑ²¼¥N¸¹
¸Ó«ç»ò¼gvba, ·|«Ü½ÆÂø¶Ü??
ªì¾ÇªÌcolor

¦^´_ 1# color790


    ªO¤W¦³«Ü¦hÃö©ó¬d¸ß ªÑ²¼ªº¤@¨Ç¤èªk~~
¦AªÌ §A³o¼Ë»¡ ½Öª¾¹D§A¦b»¡¬Æ»ò..

TOP

¦^´_ 1# color790
  1. Sub nn()
  2. For Each a In Range([A1], [A1].End(xlDown))
  3. Set MyIe = CreateObject("InternetExplorer.Application")
  4. With MyIe
  5. .Visible = True
  6. .navigate "http://tw.stock.yahoo.com/q/q?s=" & a
  7. Do Until .readyState = READYSTATE_COMPLETE
  8.    DoEvents
  9. Loop
  10. Set MyDoc = .document
  11. With MyDoc.getElementsByTagName("TABLE")(5)
  12. For k = 0 To .Rows.Length - 1
  13. s = 2
  14.   For Each n In .Rows(k).Cells
  15.   Cells(k + 1, s) = n.innerText
  16.   s = s + 1
  17.   Next
  18. Next

  19. End With
  20. .Quit
  21. End With
  22. Next
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

HI~ª©¥D,ÁÂÁ§Aªº¦^µª
§Ú§âµ{¦¡½XCOPY¶i¥h,¦ý°õ¦æ®É¥u¦³¥X²{IEªºµøµ¡,«á¨Ó´N¨S¦³°Ê¤F,
Ãö±¼IE´N·|¥X²{ ¿ù»~, °»¿ù«á¬O¤U­±³o¤@¦æ
Set MyDoc = .document
¦A³Â·Ð§AÀ°¦£¸Ñµª,·P®¦~
ªì¾ÇªÌcolor

TOP

¦^´_ 4# color790
1.§¹¾ã«Å§i¬Ý¬Ý
2.AÄ楲¶·­n¦³¦³®ÄªºªÑ²¼¥N½X
  1. Sub nn()
  2. '³]©w¤Þ¥Î¶µ¥ØMicrosoft Internet Controls
  3. '³]©w¤Þ¥Î¶µ¥ØMicrosoft HTML Object Library
  4. Dim MyIE As InternetExplorer, MyDoc As HTMLDocument
  5. r = 1
  6. For Each a In Range([A1], [A65536].End(xlUp))
  7. Set MyIE = CreateObject("InternetExplorer.Application")
  8. With MyIE
  9. .Visible = True
  10. .navigate "http://tw.stock.yahoo.com/q/q?s=" & a
  11. Do Until .readyState = READYSTATE_COMPLETE
  12.    DoEvents
  13. Loop
  14. Set MyDoc = .document
  15. With MyDoc.getElementsByTagName("TABLE")(5)
  16. For k = 0 To .Rows.Length - 1
  17. s = 2
  18.   For Each n In .Rows(k).Cells
  19.   Cells(k + r, s) = n.innerText
  20.   s = s + 1
  21.   Next
  22. Next

  23. End With
  24. .Quit
  25. End With
  26. r = r + 3
  27. Next
  28. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_  color790
1.§¹¾ã«Å§i¬Ý¬Ý
2.AÄ楲¶·­n¦³¦³®ÄªºªÑ²¼¥N½X
Hsieh µoªí©ó 2011-6-24 09:27


¦b¤½¥qªº¹q¸£¥X²{
¨Ï¥ÎªÌ«¬ºA¥¼©w¸q----> MyIE As InternetExplorer
¹L´X¤Ñ¦^®a¦A¸Õ¸Õ¬Ý, ®a¸Ì¬O¥ÎXP, ¤½¥q¬Owin7, ³£¬Oexcel2010 (¤£ª¾¹D¦³¨S¦³Ãö)

¥t¥~¥i¥H°Ý¤@­Ó¤p°ÝÃD¶Ü??
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Row = 1 Then
strtmp = Application.GetOpenFilename()
If strtmp = "False" Then Exit Sub
ActiveSheet.Pictures.Insert(strtmp).Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 83
Selection.ShapeRange.Width = 162
End If
End Sub
³oÃätarget ¥i¥H¦h­Ó½d³ò¶Ü(¤£³W«h), ¤ñ¦p1,5,8,9......)
¦]¬°§Ú¥´ If Target.Row = 1 or 3 «ç»òÅܦ¨¥þ³¡ªºÀx¦s®æ³£·|°õ¦æ?
ªì¾ÇªÌcolor

TOP

¦^´_ 6# color790

ª`·N:¥²¶·³]©w¤Þ¥Î¶µ¥Ø
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hi~ª©¥D
½Ð°Ý¤@¤U,³o´X¦æ¬O¤°»ò·N«ä
For k = 0 To .Rows.Length - 1
s = 2
  For Each n In .Rows(k).Cells
  Cells(k + r, s) = n.innerText
  s = s + 1
  Next
Next
ÁÙ¦³r=r+3
ÁÂÁª©¥D~
ªì¾ÇªÌcolor

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD