+ Reply to Thread
Results 1 to 3 of 3

Help needed on making code more efficient

  1. #1
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel 2016
    Posts
    356

    Help needed on making code more efficient

    Hi all

    I have an ExcelFile containing 200 Sheets

    In VBA the following code is entered

    Please Login or Register  to view this content.
    Now when I enter a value in $G$3 the tabs names containing the entry display immediately.
    However, when I delte the value in the cell it takes about 10 seconds for all other sheets to unhide.

    How can I optimize the above code, so that all other sheets unhide immediately?
    I have tried to set calculation to manual, resp. automatic, but this actually takes lnonger.

    Many thanks

    FD
    Last edited by FallingDown; 12-27-2011 at 09:28 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Help needed on making code more efficient

    Have you tried toggling screen update ?

    Please Login or Register  to view this content.
    You could also add a pre-emptive test of Target ("") to avoid performing the InStr

  3. #3
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel 2016
    Posts
    356

    Re: Help needed on making code more efficient

    Hi DonkeyOte

    Thanks a lot for this.

    I have very slightly altered your code to:

    Please Login or Register  to view this content.
    I have done this, because $C$1 is updated on all sheets via a macro assigned to a Form Control Button.
    My change makes this macro run faster.

    Have a great new year!

    FD

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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