+ Reply to Thread
Results 1 to 3 of 3

Display server message to user after POST file upload

  1. #1
    Registered User
    Join Date
    10-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Display server message to user after POST file upload

    I'm using VBA to upload the open workbook to app.box URL which is working great! Since I'm pretty new to VBA, I can't figure out how to get Excel to display the sucess/failed message from the server to the user. I used the VBA POST upload module from this awesome tutorial, but I can't figure out how to return the message to the user. Any suggestions?

    I did figure out that on the website there is an "id="after_upload_message", not sure if that helps. My code is below.

    Please Login or Register  to view this content.
    Last edited by cows; 02-07-2014 at 08:50 PM.

  2. #2
    Registered User
    Join Date
    02-11-2014
    Location
    Sofia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Display server message to user after POST file upload

    Hi,

    Just remove `bAsync` parameter and dimension it as a local variable (`Dim bAsync As Boolean`).

    This way the `Send` method of `XMLHTTP` will execute syncronously so you can access `ResponseText` property just after `Send` call (but before `End With` statement).

    In this way you can communicate success/failure response from the web service in plain-text (or JSON or XML encoded).

    cheers,
    </wqw>

  3. #3
    Registered User
    Join Date
    10-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Display server message to user after POST file upload

    Thanks for the help!

+ 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. Upload current document to http server (using POST)
    By Henkjan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2013, 12:37 PM
  2. Use a Macro to Upload Excel File to FTP Server when saving
    By Kris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2006, 12:50 PM
  3. Upload file on a server
    By loopoo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2006, 10:30 PM
  4. [SOLVED] upload excel file into sql server
    By vic pahilan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2005, 07:35 AM
  5. [SOLVED] save XL file to server via FTP upload
    By windsurferLA in forum Excel General
    Replies: 0
    Last Post: 12-02-2005, 03:45 AM

Tags for this Thread

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