- ©«¤l
- 26
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 27
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- OFFICE 2013
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-1-21
- ³Ì«áµn¿ý
- 2021-3-25
|
[µo°Ý] §ä¤£¨ìªººô¶¦p¦ó³]©w¦Û°Ê¸õ¹L,µM«á°õ¦æ¤U¤@Ó©O?
¥»©«³Ì«á¥Ñ norafang ©ó 2014-2-2 10:40 ½s¿è
è§ä¤F¤@¤U,¬ÛÃö¥DÃD§ä¤£¨ì§Únªºµª®×,©Ò¥H·Q»¡°Ý¬Ý¬Ý¦³¨S¦³¤j¤j¥i¥HÀ°¦£¸Ñ¨M
¤º®e¬O,§Ú¦³¤@ÓºÞ±±ªí©T©w¥h®»¤@¨Ç¯S©wºô¯¸ªºªÑ²¼¸ê®Æ,¦ý¦³¨Çºô¯¸¤]³\¨Ã¨S¦³²Å¦X¨C¤@ÀɪѲ¼ªº¸ê®Æ´N·|²£¥Í¿ù»~
¤ñ¦p§Ú¦b®»¥x¿n¹q2330¤]³\¦byahoo·|¦³¤½¥q¸ê®Æ,¦ý¥xÆW50, 0050¤]³\´N®»¤£¨ì¤F,
¹J¨ì³oºØ¬ÛÃöªº¼gªk,¤S¤£·Q¦]§ä¤£¨ì´N¤¤Â_µ{¦¡ªº°ÝÃD,¦p¦ó¼g¤@¬qÅý¥¦§ä¤£¨ì´N¸õ¹L¥h¸Óºô¯¸,¦A¶i¦æ¤U¤@Óºô¯¸ªº®»¨ú©O?
¦]¬°¾ãÓ¼gªk«Üªø,§Ú§â§Ú¼gªº«e¤GÓ®»¨úºô¯¸¶K¤W,§Úªº0050´N°±¦b²Ä¤GÓºô§}´N¶]¤£¤U¥h¤F
x = Worksheets("ºÞ±±ªí").Range("a1")
datetake = Format(Now, "yyyy-m-dd")
datetake180 = Format(Now - 180, "yyyy-m-dd")
yeartake = Format(Now, "yyyy")
yeartakech = Worksheets(Sheets.Count).Range("a43")
siteshow = "http://money.hinet.net/z/z0/z00/z00a_" & x & "_" & datetake180 & "_" & datetake & "_M.djhtm"
' MsgBox siteshow
Worksheets("copy").Copy after:=Worksheets(Sheets.Count)
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://tw.stock.yahoo.com/q/q?s=" & x, Destination:=Worksheets(Sheets.Count).Range("$AA$1"))
.Name = "q?s=" & x
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://tw.stock.yahoo.com/d/s/company_" & x & ".html", Destination:=Worksheets(Sheets.Count).Range( _
"$AA$9"))
.Name = "company_" & x
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "9,10,11"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
end sub |
|