+ Reply to Thread
Results 1 to 2 of 2

Excel VBA Object - List of settings to turn off until completed to speed up process

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Arrow Excel VBA Object - List of settings to turn off until completed to speed up process

    Can people provide a list of suggestions on setting that will speed up the Excel automation process?
    Example: Set ObjXL.Visible = False - speeds up the process since graphics don't need to be updated.

    Dim ObjXL as Excel.Application

    All database reports use Excel Objects to create a new workbook, move data into it, and complete many detailed formating, data analysis, and custom formula entry.
    An application, such as MS Access 2010 creates an excel object, sets the visible property to false, creates all the details, performs a SaveAs with a custom name/location and destroys the object variable.
    It all works perfectlly every time.
    The code can range one to three pages.

    Does anyone have suggestions on what settings to put in place when the ObjXL instance is created?
    Settings that can be set at the beginning of the VBA automation for speed and then set back before the final Save As

    Things such as the re-caculate fields?
    Or, boosting the Thread Priority?

    Workbook.ForceFullCalculation ?
    Application.ScreenUpdating = False ?
    Application.Calculation = xlCalculationManual ?
    Last edited by RxMiller; 04-18-2012 at 12:31 PM. Reason: found MSDN examples to add

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Excel VBA Object - List of settings to turn off until completed to speed up process

    Hello RxMiller ,

    All the things you have mentioned are good starts to decreasing the macro's runtime. Other factors like how the code routines are constructed also have a large influence on execution speed. Without the code to review, it really is not possible to suggest much else.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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