+ Reply to Thread
Results 1 to 5 of 5

Programmatically find Dropbox folder path using VBA (Parse JSON)

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Programmatically find Dropbox folder path using VBA (Parse JSON)

    I'm somewhat curious about the possibility of creating a function that would return a users Dropbox path.

    Apparently users can change the default path so that can't be relied upon. According to https://www.dropbox.com/help/desktop...dropbox-folder the path is stored in a JSON in one of two locations.

    How would I parse the file (preferably without requiring any additional libraries if can be avoided) to return the necessary value?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Programmatically find Dropbox folder path using VBA (Parse JSON)

    There's nothing special about JSON, it's just text:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Programmatically find Dropbox folder path using VBA (Parse JSON)

    Good to hear from you again Kyle. I tested your code and it works for me. Reps +1

    I actually don't have any need for the function (which explains why I couldn't be bothered to make an attempt myself! ) but there would be people out there who would find this function useful (which is why I made the thread)

    To anybody else using this function, I would suggest considering the following changes:
    1. MsgBox or error handler if the JSON files are missing (i.e. user doesn't have DropBox installed)
    2. Optional boolean argument to return the Business path instead of the Personal path by default (if end user has both Work and Personal Dropbox accounts on the same computer)

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Programmatically find Dropbox folder path using VBA (Parse JSON)

    Brilliant, thanks for that - great use of my time

  5. #5
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Programmatically find Dropbox folder path using VBA (Parse JSON)

    Not at all Kyle. Only too happy to rep you for solving.

+ 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. avoid parse json errro 10001 stop
    By incobart in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2017, 04:06 AM
  2. Use Excel VBA to Get and parse an API JSON response
    By proverbguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2017, 02:56 PM
  3. Parse / flatten nested JSON string in VBA
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2016, 08:45 AM
  4. [SOLVED] Help with Macro to find full path of Folder, using input of first 4 chars of folder name
    By Anxiety in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2015, 09:02 AM
  5. Macro works in every folder except dropbox folder
    By luismarq in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-02-2015, 08:31 AM
  6. Code to list the folder path and sub folder path of a specific file
    By kalai1587 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 03:51 AM
  7. Find folder path with partial information
    By superdonk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-07-2013, 09:15 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