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

[µo°Ý] [µo°Ý]¦p¦ó§ó§ï³sµ²ºô§}¦¨ÅܼÆ?

[µo°Ý] [µo°Ý]¦p¦ó§ó§ï³sµ²ºô§}¦¨ÅܼÆ?

¦U¦ì«e½ú¡A§Æ±æ¤£§[½ç±Ð!!ÁÂÁÂ

»¡©ú
§Q¥Îªí³æ³sµ²¨ì«ü©wºô§}
Â^¨ú©Ò¦³¤º®e«á¥[¥H­pºâ¡C

¸ê®Æ¬°
http://www.google.com/finance/historical?q=TPE%3A1101&start=0&num=200

ºÃ°ÝÂI
1.¦p¦ó±Nºô§}¸Ìªº1101§ó§ï¦¨ÅܼơA¥i¥H¥ÑÀx¦s®æ¨Ó§ó°Ê??
2.¥ç©Î¦¹ºô§}µLªk°µÅܼƧó°Ê¡A­n¥t¥~¤èªk¨ÓÂ^¨úªí³æ??

­ì©l½X
  1. Sub Stock_Data()

  2. Dim STK_NO As String

  3. STK_NO = 1101   'Sheets("Result").Cells(3, "B")

  4. If STK_NO = "" Then Exit Sub

  5. Const url As String = "http://www.google.com/finance/historical?q=TPE%3A&STK_NO&start=0&num=200"

  6. Cells.Clear
  7.    
  8. Application.DisplayStatusBar = True

  9. Application.ScreenUpdating = False
  10.    
  11. Set ie = CreateObject("internetexplorer.application")

  12. With ie
  13.    
  14.     .Visible = False
  15.    
  16.     .Navigate url
  17.         
  18.     Do While .ReadyState <> 4
  19.         
  20.         DoEvents
  21.    
  22.     Loop
  23.    
  24.     .ExecWB 17, 2
  25.    
  26.     .ExecWB 12, 2
  27.    
  28.     Sheets("Data").Range("B7").Activate
  29.    
  30.     ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
  31.             False, NoHTMLFormatting:=True

  32. End With

  33. Range("B7:G51,B252:G275").delete Shift:=xlUp
  34.    
  35. ie.Quit
  36.    
  37. End Sub
½Æ»s¥N½X
Nicole

  1. Sub Stock_Data()
  2.     Dim STK_NO As String, url As String
  3.     STK_NO = Sheets("Result").Cells(3, "B")
  4.     If STK_NO = "" Then Exit Sub
  5.     url = "http://www.google.com/finance/historical?q=TPE%3A" & STK_NO & "&start=0&num=200"
  6.     'Cells.Clear
  7.     Application.DisplayStatusBar = True
  8.     Application.ScreenUpdating = False
  9.     Set ie = CreateObject("internetexplorer.application")
  10.     With ie
  11.         .Visible = False
  12.         .Navigate url
  13.         Do While .ReadyState <> 4
  14.             DoEvents
  15.         Loop
  16.         .ExecWB 17, 2
  17.         .ExecWB 12, 2
  18.         Application.Goto Sheets("Data").Range("B7")
  19.         ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
  20.                                                                              False, NoHTMLFormatting:=True
  21.     End With
  22.     Range("B7:G51,B252:G275").Delete Shift:=xlUp
  23.     ie.Quit
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# oobird
ÁÂÁ¤j¤jªºÀ°¦£¡A¥Ø«e°ÝÃD¤w¸Ñ¨M¡C
¤pªº®Ö¹ïµ{¦¡¤Wªº®t§OÁÙ¦³¤@¨Ç°ÝÃD·Q½Ð±Ð¡A§Æ±æ¤£§[½ç±Ð!!!ÁÂÁÂ

1.±N³sµ²ºô§}³¡¤À§ï¦¨" & STK_NO & "¡A¤pªº¬Q¤Ñ¦³¹Á¸Õ¹L¡A«o¥u±o¨ì«Ü¤Ö³¡¤À¤S¤£§¹¾ãºô­¶¸ê°T¡A
   ®Ö¹ï¤Fµ{¦¡¤Wªº®t§O¡Aµo²{¤j¤j¦³©w¸q url As String¡A
   ½Ð°Ý¬°¦ó¼W¥[³o©w¸q§Y¥iÂ^¨ú§¹¾ã¸ê°T??¤S¬°¦ó¦b§Oªººô­¶¤£»Ý©w¸q¤]¥i¥H¨Ï¥Î??

2. Application.Goto Sheets("Sheet2").Range("B7") ³o¬q¸ò§Ú­ì¥ýªº Sheets("Sheet2").Range("B7"). Activate
    ®t§O¦b­þ¸Ì??§Ú¦³¥h¬dF1»¡©ú¤£¤Ó¤F¸Ñ¡A¥i§_¸ÑÄÀ¤@¤U¡C.
Nicole

TOP

1.§A¬O¥Î"Const url As String ="¤è¦¡«Å§iurl¬°¦r²Å«¬ºA¡A³o¾A¦X¥Î¦b±`¶q«Å§i¡A¤£¯à¥Î¦bÅܶq¡C
2.­ì¥ýªº Sheets("Sheet2").Range("B7"). Activate¥²¶·¦b·í«e¤u§@ªí¬°"Sheet2"®É¤~¯à¦³®Äªº¨ìrange("b7"), ­Y¤£¦b³o­Óªí´N¥²¶·¼g¨â¦æ¡A¥ý¨ìsheet2, ¦A¨ìb7. §ï¬°Application.Goto Sheets("Sheet2").Range("B7")¬O¬°¤F¤@¦æ¨ì¦ì¡C

TOP

1.§A¬O¥Î"Const url As String ="¤è¦¡«Å§iurl¬°¦r²Å«¬ºA¡A³o¾A¦X¥Î¦b±`¶q«Å§i¡A¤£¯à¥Î¦bÅܶq¡C
2.­ì¥ýªº Sheets("Sheet2").Range("B7"). Activate¥²¶·¦b·í«e¤u§@ªí¬°"Sheet2"®É¤~¯à¦³®Äªº¨ìrange("b7"), ­Y¤£¦b³o­Óªí´N¥²¶·¼g¨â¦æ¡A¥ý¨ìsheet2, ¦A¨ìb7. §ï¬°Application.Goto Sheets("Sheet2").Range("B7")¬O¬°¤F¤@¦æ¨ì¦ì¡C

TOP

¦^´_ 5# oobird
¯uªº«D±`·PÁ¤j¤j~
Åý§Ú²M·¡©ú¥Õ¿ù»~ÂI!!!!:)
¦³«éµM¤j®©ªº·Pı~ÁÂÁÂ
Nicole

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD