+ Reply to Thread
Results 1 to 7 of 7

VBA to save entire workbook with less time

  1. #1
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    200

    VBA to save entire workbook with less time

    Hello,

    I have a file (to big to attach). It has Charts, pivots, power query pulls and one sheet of formulas. It takes 10-12 mins to save. This is my code to save. I need the calculations to be turned on before the save so they can work. However in general the calc's can be turned off after the workbook saves successfully.

    Please Login or Register  to view this content.
    I am trying to find out if there is further code or another method to save this workbook fast where it takes less time. Any suggestions? Thanks!

    Below is more file info
    Capture.PNG

    File Size.PNG

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,431

    Re: VBA to save entire workbook with less time

    I'm curious ... have you tried saving the workbook as a COPY, rather than saving it 'straight out' ?

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: VBA to save entire workbook with less time

    Shruder,
    Depending on the workbook function and layout ...You could export the data sections to a txt file and import the txt file after opening the workbook. Other wise use as many worksheet functions as possible as the vba syntax will increase the file size and slow the calx's down.
    Hope that helps
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,017

    Re: VBA to save entire workbook with less time

    Have you tried saving it as an xlsb? File size is generally quite a bit smaller although that doesn't necessarily mean it will save more quickly.
    If it's on a network, does it save any quicker to a local destination?

  5. #5
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    200

    Re: VBA to save entire workbook with less time

    It is currently an xlsb file. I moved to local drive from sharepoint and it took 5 mins longer to save.

    So far here are the stats:

    SHAREPOINT: Turned auto save off and manually saved file, it took 12 mins as xlsb file.
    LOCAL DRIVE: saved file manually, it took 17 mins as xlsb file.

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,657

    Re: VBA to save entire workbook with less time

    I think it is not the way how you save it.
    Its is all the calculation that must be done.
    Take a look at that for quicker savetime
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  7. #7
    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,908

    Re: VBA to save entire workbook with less time

    It looks like your screenshot is showing us a .xlsb file that is 2.75MB. That should not take over 10 minutes to save. It's not that big. If you would like us to experiment with it, we accept .xlsb or .zip attachments up to 9.77MB.

    Quote Originally Posted by Shruder View Post
    I need the calculations to be turned on before the save so they can work.
    I'm not clear on your expectation here. The calculation setting is for the Excel app, not for the file. In manual mode, it will recalculate before a save anyway. Turning on auto, saving, then going back to manual does not have any effect compared to leaving in manual.

    Quote Originally Posted by Shruder View Post
    I moved to local drive from sharepoint and it took 5 mins longer to save.
    That is mostly likely because of network overhead rather than SharePoint itself. Fifty percent longer than a local save doesn't surprise me.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Replies: 3
    Last Post: 06-03-2020, 12:36 PM
  2. Replies: 7
    Last Post: 03-28-2016, 07:55 PM
  3. [SOLVED] Need to Copy/Save Entire Workbook as .XLSX but Keep Macros Running
    By bryanmarks in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-29-2014, 07:43 PM
  4. VBA Code to save copy worksheet not entire workbook
    By njohnn in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-13-2014, 12:00 PM
  5. Save entire workbook as copy in specific folder with VBA
    By cychua in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-01-2012, 08:35 AM
  6. Time lock an entire workbook - even unprotected cells
    By AlexanderTheAverage in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2012, 01:57 PM
  7. Copy entire workbook then prompt 'save as'
    By sgeorge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2007, 12:10 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