+ Reply to Thread
Results 1 to 8 of 8

Macro saves excel to Dropbox or one drive but with multiple users

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Macro saves excel to Dropbox or one drive but with multiple users

    Hi guys,

    Really struggling with an Excel invoice program that requires file paths that have Users\user in the macros that then save the file to dropbox. I have multiple users that need access to this invoice file and don't know how to get them to successfully save the file with this current line of code which has to have Users\user when it could be Users\'anyname'\ in the code.

    Appreciate all input!

    Regards
    Mark

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    get them to successfully save the file with this current line of code which has to have Users\user when it could be Users\'anyname'\ in the code.

    why could it be ''anyname''?? aren't you the programmer? why is ''anyname'' in there? why not just restrict it to what you want?

  3. #3
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    Hi Thanks for the reply, life took hold & changed my priorities for me, hence the delay in my response.

    I wouldn't class myself as a programmer just yet as this was my first big project, so still learning!

    Having upgraded the PC's to Microsoft 365, each user now has a different user name which doesn't match the file path I have in the code in VBA. When a save macro button is clicked in the macro enabled excel document, it saves an excel copy of the file to one folder in dropbox and then a pdf version to another folder in dropbox. The path is currently set to C:/User/user/blah blah. But with the 365 upgrade changing User to a name eg: C:/User/Name of person/ blah blah blah. I need a work around. I can either do an IF function for each user in the code but would prefer it to be simpler than that, so that when we get new users I don't have to update the code with their user name and IF command. (PS not sure IF would even work but that was my initial thought. If file path incorrect try the next path until it can save the files.)

    Hope that makes some form of sense, appreciate you looking at this. All help is very welcome!

  4. #4
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    Hi Guys,

    How do I get someone from Commercial Services to help me with this???

    I could really do with solving this problem. Not really getting anywhere on the forum and its getting to crunch time. PC upgrades are the motivator.

    I have multiple users and PC's accessing these files. (Invoice system)

    Currently the file path for my macro's and code use is, C:\User\User\Dropbox\etc See below for full code. However moving to microsoft 365 meant I had to have a registered user on each pc so now everybody's file path is different. Eg PC1. might be C:\User\Mr C Cloggs\Dropbox\etc, PC 2 C:\User\L Somebody\Dropbox\etc and so on.

    If somebody knows how to work around this I would appreciate it. Having never opted for the Commercial Services before I am unsure of how the pricing works also so please let me know how much this would cost.


    Google searches has others searching for the same as my problem and they called it a dynamic username and have talked about using Environ but I'm out of time to get this sorted.

    Thanks in advance.


    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    How about
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    I will give it a whirl and see, thank you!

  7. #7
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    Hi Fluff13,

    It worked!!!!!!!!!!! Just did a little jig around the office. Feeling very happy, Thank you very much!

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Macro saves excel to Dropbox or one drive but with multiple users

    You're welcome & thanks for the feedback.

+ 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: Automated email to multiple users with attachment from mapped drive
    By amature_hour in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-10-2019, 07:52 PM
  2. Problem with a macro that saves to an online drive
    By Jstns in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2018, 10:08 AM
  3. File download from google drive and dropbox
    By patz006 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2015, 10:02 AM
  4. [SOLVED] File(s) on a network drive, with multiple users. Looking for strategy help
    By rreifs68 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2015, 10:08 PM
  5. Replies: 4
    Last Post: 03-04-2013, 08:47 AM
  6. Need Macro that saves a second copy of an Excel spreadsheet to a shared network drive
    By rockhunter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-27-2011, 01:42 PM
  7. I need a macro that saves a spreadsheet on two drive at once,
    By Chauncy_G in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2006, 04:15 PM

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