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

Excel ¦p¦ó¦b­I´º§¹¦¨¼Æ¾Ú¾É¤J

Excel ¦p¦ó¦b­I´º§¹¦¨¼Æ¾Ú¾É¤J

·í§Ú°õ¦æ¦¨¥\¾É¤J¥~³¡¼Æ¾Ú¡Aexcel ³£·|³QIJµo¡]excel app icon·|¶À¦â¤£°±°{Ã{¡^¡AµM«á´N­n¨C¦¸¤â°ÊÂI·Æ¹«¥h§â¥¦«ö±¼¡C
¦pªG¬O¨C¤ÀÄÁ¾É¤J¤@¦¸¡A´N­n¨C¤ÀÄÁ³£«ö¤@¦¸·Æ¹«... ¤£ª¾¦³¿ìªkÅýexcel¦b­I´º°ÊºA¾É¤J¡A¤S¤£·|IJµoicon¤£°±°{Ã{©O¡H


Sub hkdata()

¤u§@ªí1.Cells.Clear


'
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://hk.finance.yahoo.com/q?s=^hsi", Destination:=Range("$A$1"))
        .Name = "q?s=^hsi"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub

excel.png (19.7 KB)

excel.png

·í§Ú°õ¦æ¦¨¥\¾É¤J¥~³¡¼Æ¾Ú¡Aexcel ³£·|³QIJµo¡]excel app icon·|¶À¦â¤£°±°{Ã{¡^¡AµM«á´N­n¨C¦¸¤â°ÊÂI·Æ¹«¥h ...
sfff µoªí©ó 2015-6-28 12:29


§â  Application.DisplayAlerts = False ' Ãö³¬Äµ§i°T®§  ©ñ¦b    ¤u§@ªí1.Cells.Clear «e­±

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¥»©«³Ì«á¥Ñ sfff ©ó 2015-6-29 03:46 ½s¿è

ªGµM°£¤F¥´¶}¤å¥óªº­º¦¸¾É¤J¦³Äµ§i¡A¤§«á´NµLIJµoĵ§i°T®§¤F¡I
:victory:  Thanks

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD