Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7680675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:10:10+00:00 2026-05-31T18:10:10+00:00

Does anyone know if there is an sample code for using Visual Basic to

  • 0

Does anyone know if there is an sample code for using Visual Basic to connect to Box.com documents?

We have some elaborate VB Excel macros that pull data in from various files. Now that we have switched over to using box.com as our file system, we would like these macros to read/write the required data to files stored in Box.com.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:10:11+00:00Added an answer on May 31, 2026 at 6:10 pm

    Here is some sample code for uploading a file in VBScript to Box:

    api_key = "Your API key from Box.net"
    BoxNetUserName = "Your Box.net username"
    BoxNetPwd = "Your Box.net Password"
    
    UploadFileBoxNet("c:\coupons.pdf") 
    
    Function UploadFileBoxNet(filePath)
    
     Print filepath
    
         Set WinHttpReq = CreateObject("Msxml2.ServerXMLHTTP")
    
     '**********Requesting Ticket
      strURL = "https://www.box.net/api/1.0/rest?action=get_ticket&api_key=" & api_key
      temp = WinHttpReq.Open("POST", strURL, false)
      WinHttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
      WinHttpReq.Send()
      getTicket = WinHttpReq.ResponseText
      Print strURL
      Print getTicket
     '**********Extracting Ticket from XML Response********
      getTicket = Left(getTicket,Len(getTicket)-20)
      getTicket = Right(getTicket,Len(getTicket) - Instr(getTicket,"t>")-1)
      Print getTicket
    
     '****Opening Authentication Window for Box.net********
      Systemutil.Run "iexplore", "https://www.box.net/api/1.0/auth/" & getTicket
      Browser("name:=Box.net.*").WebEdit("name:=login").Set BoxNetUserName
      Browser("name:=Box.net.*").WebEdit("name:=password").Set BoxNetPwd
      Browser("name:=Box.net.*").WebElement("name:=Login","height:=25").Click
      Browser("name:=Box.net.*").Sync
      Browser("name:=Box.net.*").Close
    
     '*****Requesting Auth_Token
      strUrl = "https://www.box.net/api/1.0/rest?action=get_auth_token&api_key=" api_key & "&ticket=" & getTicket
      temp = WinHttpReq.Open("POST", strURL, false)
      WinHttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
      WinHttpReq.Send()
      Auth_Token = WinHttpReq.ResponseText
      Print strURL
    
     '******Parsing Auth Token from XML Response
      Set xmlObj = XMLUtil.CreateXML()
      xmlObj.Load Auth_Token
      Print xmlObj.ToString()
      Print " ========================================================================= "
      Set myToken = xmlObj.ChildElementsByPath("/response/auth_token")
      Print myToken.Count
      For i = 1 to myToken.Count
         Auth_Token = myToken.Item(i).Value()
         Print Auth_Token
         Print " "
      Next
    
      strURL = "https://upload.box.net/api/1.0/upload/" & Auth_Token & "/0"
    
     '*****Calling the Upload File method of the .Net Class System.Net.WebClient
      Set wcl = DotNetFactory.CreateInstance ("System.Net.WebClient")
      strResult = wcl.UploadFile(strURL, filepath)
    
    End Function
    

    source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know there have any other way that (by not using json_encode and
Does anyone know if there are new binaries for the castle logging facility using
Does anyone know if there is some type of tool, preferably a Firefox add
Does anyone know if there is some parameter available for programmatic search on yahoo
Does anyone know how to read a x.properties file in Maven. I know there
Does anyone know if there are any (ideally free) alternatives to SilkTest for automated
Does anyone know if there's a Flash (ActionScript) library for providing back button support?
does anyone know if there is a Twitter API library for the .Net Compact
Does anyone know if there is a limit to the number of applications I
Does anyone know is there a way to implement Windows Live ID authentication into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.