+ Reply to Thread
Results 1 to 2 of 2

Error on WebQuery

Hybrid View

  1. #1
    Registered User
    Join Date
    06-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    92

    Error on WebQuery

    Hello all, recorded this code before:


    Sub WebQuery()
    
        With ActiveSheet.QueryTables.Add(Connection:= _
            "URL;http://data.terapeak.com/?id=0&search=2&view=titles&query=my1stwish&date=2012-07-26&date_range=30&siteID=3" _
            , Destination:=Range("$F$5"))
            .Name = _
            "?id=0&search=2&view=titles&query=my1stwish&date=2012-07-26&date_range=30&siteID=3"
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = True
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .WebSelectionType = xlAllTables
            .WebFormatting = xlWebFormattingNone
            .WebPreFormattedTextToColumns = True
            .WebConsecutiveDelimitersAsOne = True
            .WebSingleBlockTextImport = False
            .WebDisableDateRecognition = False
            .WebDisableRedirections = False
            .Refresh BackgroundQuery:=False
        End With
        ActiveWindow.SmallScroll Down:=36
    End Sub

    When run, it gives the error : "System Error&H80070057 (-2147024809). The Parameter is incorrect

    Looking at the parameters I see no obvious error, any ideas?
    Regards,
    Usman.

  2. #2
    Forum Contributor
    Join Date
    06-09-2011
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    194

    Re: Error on WebQuery

    Hi Usman,

    maybe the issue is caused by the website requesting a username and password

    Regards

    Theo
    Remember To Do the Following....
    1. Upload sample files
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1