+ Reply to Thread
Results 1 to 4 of 4

Make the below code work faster!!!

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    60

    Question Make the below code work faster!!!

    Hi,
    I want to make this code work more faster.Actually this code is for adding rows below a already existing table.The table has conditional formatting and Data validation.
    for that only I have used the copy and paste.
    I have already used Application.ScreenUpdating = False
    in the begining of the code.
    In the below code "x" is for number of rows to be inserted.If 2 has to be inserted means then the code runs 2 times and so 2 rows are inserted.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Make the below code work faster!!!

    Hello devpp,

    With your Application.ScreenUpdating= False, try adding Application.Calculation= xlCalculationManual,and then at the end of your Code, with Application.ScreenUpdating = True, add also Application.Calculation = xlCalculationAutomatic.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    12-27-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Make the below code work faster!!!

    Quote Originally Posted by Winon View Post
    Hello devpp,

    With your Application.ScreenUpdating= False, try adding Application.Calculation= xlCalculationManual,and then at the end of your Code, with Application.ScreenUpdating = True, add also Application.Calculation = xlCalculationAutomatic.
    Actually I cant add xl calculation as manual as there is some calculations involved when the rows are added in another sheet.so is there any other alternative?

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Make the below code work faster!!!

    Hello devpp,

    Actually I cant add xl calculation as manual as there is some calculations involved when the rows are added in another sheet.
    Since Calculation is turned back onto Automatic at the end of the Code, it will not effect any calculating requirements in any sheets.

    Just do it, and see for yourself.

+ 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. [SOLVED] Ways to make my code run faster
    By JazzyBear in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-03-2013, 03:59 PM
  2. [SOLVED] Make code run faster
    By ozhunter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2013, 04:26 AM
  3. Can anyone optimize the code? (to make it work faster)
    By olegai in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2007, 07:50 AM
  4. Make Excel work faster
    By Siva in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2006, 11:10 AM
  5. [SOLVED] Make Excel Work faster
    By Siva in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-07-2006, 05:35 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