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

[µo°Ý] ½Ð°Ý¹d¦ëºô¦p¦ó½s¼g§ì¨ú§Ú­nªº¤é´ÁªÑ»ù¸ê®Æ

ÀH«K¼g¼g¡A°Ñ¦Ò¬Ý¬Ý

Sub ¥¨¶°1()
'
' ¥¨¶°1 ¥¨¶°
'

'
Dim S As String
Dim E As String
Dim B As String
Dim P As String

S = "ctl00$ContentPlaceHolder1$startText="
E = "ctl00$ContentPlaceHolder1$endText="
B = "ctl00$ContentPlaceHolder1$submitBut=""¬d¸ß"""
P = Format(InputBox("½Ð¿é¤J°_©l¤é´Á", "°Ñ¼Æ¿é¤J", Date), "YYYY/MM/DD")
S = S + P
P = ""
P = Format(InputBox("½Ð¿é¤Jµ²§ô¤é´Á", "°Ñ¼Æ¿é¤J", Date), "YYYY/MM/DD")
E = E + P
    Application.CutCopyMode = False
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://www.cnyes.com/twstock/ps_historyprice.aspx?pageTypeHidden=1 & code=2330" & S & E & B, _
        Destination:=Range("$A$1"))
'        .CommandType = 0
        .Name = "ps_historyprice.aspx?code=2330"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = "1"
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub
Rogersg

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD