Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sub main_webquery()
    Call webQuery
End Sub
Sub webQuery()
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://finance.naver.com/item/sise_day.nhn?code=035720", Destination:= _
        Range("$A$1"))
        .Name = "sise_day.nhn?code=035720_1"
        .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
    Rows("2:2").Select
    Selection.Delete Shift:=xlUp
    Rows("7:9").Select
    Selection.Delete Shift:=xlUp
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment