+ Reply to Thread
Results 1 to 5 of 5

Is it good idea to run large VBA program in OneDrive?

  1. #1
    Forum Contributor VAer's Avatar
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    803

    Is it good idea to run large VBA program in OneDrive?

    I tend to save macro-enable workbook in local hard drive, since I believe that it will run much faster in local hard drive.

    How about running the program when file is saved in OneDrive? Does it slow down a lot?

    I don't really use OneDrive before, if I install OneDrive in every PC, does it make difference if you run macro in OneDrive folder vs. run macro in local hard drive folder?

    One good thing to store file in OneDrive: I can have most current version of file in multiple device.

    Thanks.
    Last edited by VAer; 05-28-2023 at 05:01 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,983

    Re: Is it good idea to run large VBA program in OneDrive?

    I believe that it will run much faster in local hard drive.
    What is the basis for this?

    The execution speed of VBA does not depend on where you opened the file from. The file is loaded into memory and all the work is done there no matter where the file is stored on disk.

    However, if your file is in OneDrive and Excel is set for AutoSave it is possible that Excel is saving the file over the network as your code makes changes, which could take some time. I am not familiar with the internals of how Excel manages AutoSave, but I suspect it is a background process that would not slow down code execution. It would just use a little additional CPU and I/O time.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,462

    Re: Is it good idea to run large VBA program in OneDrive?

    This explains how OneDrive syncs files: https://learn.microsoft.com/en-us/sh...t/sync-process

    In all honesty, I don't know the answer. And I guess it would depend on several factors. I suspect that there could be a slight overhead if OneDrive is communicating changes to the cloud but one would hope it is optimised and the delay(s) would be minimal. If you are the only person using the file, I imagine the changes would be sent and, presumably, an acknowledgement received. If more than one person is using the file, then changes would need to be synchronised both (or multiple) ways.

    I expect it would also depend on the efficiency of your code. If, for example, you read your data into an array and then process it in memory the changes to the actual data would not occur one at a time, but then the data would need to be updated.

    Any processing would also be affected by anything else happening in your computer.

    It should be easy enough to check. Put a timer routine into the code and then run it from both locations. Run the comparison several times to get an average time.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,462

    Re: Is it good idea to run large VBA program in OneDrive?

    Follow up: I have a workbook that I use to track my energy bills (electric and gas). That file is in OneDrive so I can access it from all my devices. It is not using VBA but there are a lot of dynamic spill formulae. It is set to AutoSave. I can see, when I record new entries, that the file is saved immediately. There is no apparent or obvious delay in processing.

  5. #5
    Forum Contributor VAer's Avatar
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    803

    Re: Is it good idea to run large VBA program in OneDrive?

    Quote Originally Posted by 6StringJazzer View Post
    What is the basis for this?
    .
    I don't know, that is why I am asking. Just my guessing that it will run slower in non-local hard drive environment.

+ 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. fast data load on power query ?? good idea or not ??
    By steve78 in forum Excel General
    Replies: 3
    Last Post: 07-13-2021, 09:38 AM
  2. Replies: 2
    Last Post: 06-15-2021, 05:19 PM
  3. Is it good idea to use Global variable?
    By lastnn30 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2021, 03:01 PM
  4. [SOLVED] Is using names with function get.workspace a good idea?
    By bagullo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2015, 02:45 AM
  5. Macro to go to a hidden worksheet. Good/Bad idea?
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2010, 02:07 PM
  6. Protected Workbook - Not a Good Idea!
    By Karen in forum Excel General
    Replies: 2
    Last Post: 07-06-2006, 12:25 PM
  7. RecordSet & New Class - Good idea?
    By Alan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2005, 02:05 AM

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