+ Reply to Thread
Results 1 to 2 of 2

VBA 400 Error

  1. #1
    Registered User
    Join Date
    01-23-2018
    Location
    United States
    MS-Off Ver
    2016
    Posts
    1

    VBA 400 Error

    Hello,

    I'm very new to VBA, but am trying to simply get a table of data into my excel workbook so that I can mess with it. I've googled answers and have found something that works with a different website url, but when I put in the URL that I am actually targeting it gives me a VBA 400 Error. Not sure what the difference is between this URL and that. The one I'm targeting is on a private server so not sure if that has anything to do with it?

    Sub trial_macro()
    Dim thisWb, downloadWb As Workbook
    Set thisWb = ActiveWorkbook

    Set downloadWb = Workbooks.Open("https://fclm-portal.amazon.com/reports/functionRollup?reportFormat=HTML&warehouseId=MSP1&processId=1002976&maxIntradayDays=1&spanType=Intraday&startDateIntraday=2018%2F01%2F20&startHourIntraday=17&startMinuteIntraday=0&endDateIntraday=2018%2F01%2F21&endHourIntraday=5&endMinuteIntraday=30")

    downloadWb.Worksheets(1).Range("A1:U2613").Copy Destination:=thisWb.Worksheets(1).Range("A2")

    downloadWb.Close

    End Sub

    Here is my code.

    Any help would be greatly appreciated.

    Thank you,

    angus1995

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA 400 Error

    Before you are trying to open and download it, you should test the URL as a link and see what you get. I have got a proxy server error. It might be an Intranet sever which means you might need some kind of authorisation to access it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  6. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  7. [SOLVED] Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

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