+ Reply to Thread
Results 1 to 4 of 4

Just in case there is a cure for "jumping rows"...

  1. #1
    Registered User
    Join Date
    06-07-2006
    Location
    Montreal
    Posts
    73

    Red face Just in case there is a cure for "jumping rows"...

    I finished programming my buttons to toggle between summary / complete views, which works fine.

    Dim cell As Range
    For Each cell In Range("B:B")
    If cell = "i" Then Rows(cell.Row).Hidden = True (False for complete view)
    Next

    There is just this small problem, which I know is normal, but I wonder if I can do something about it: when the file is big, and there is lets say more than a 100 rows, the screen goes jumping for a few seconds while the macro is being executed. I know it can be explained by the fact the program is a cycle, but is there anything I can do so that the screen doesn't jump?

  2. #2
    Gord Dibben
    Guest

    Re: Just in case there is a cure for "jumping rows"...

    Add a couple of lines to your code

    Dim cell as Range
    Application.ScreenUpdating = False

    rest of your code here

    Application.ScreenUpdating = True


    Gord Dibben MS Excel MVP

    On Tue, 20 Jun 2006 13:54:39 -0500, Turquoise_dax
    <[email protected]> wrote:

    >
    >I finished programming my buttons to toggle between summary / complete
    >views, which works fine.
    >
    >Dim cell As Range
    >For Each cell In Range("B:B")
    >If cell = "i" Then Rows(cell.Row).Hidden = True (False for
    >complete view)
    >Next
    >
    >There is just this small problem, which I know is normal, but I wonder
    >if I can do something about it: when the file is big, and there is lets
    >say more than a 100 rows, the screen goes jumping for a few seconds
    >while the macro is being executed. I know it can be explained by the
    >fact the program is a cycle, but is there anything I can do so that the
    >screen doesn't jump?



  3. #3
    kassie
    Guest

    RE: Just in case there is a cure for "jumping rows"...

    Start your code with Application.ScreenUpdating=False, end with
    Application.ScreenUpdating=True

    "Turquoise_dax" wrote:

    >
    > I finished programming my buttons to toggle between summary / complete
    > views, which works fine.
    >
    > Dim cell As Range
    > For Each cell In Range("B:B")
    > If cell = "i" Then Rows(cell.Row).Hidden = True (False for
    > complete view)
    > Next
    >
    > There is just this small problem, which I know is normal, but I wonder
    > if I can do something about it: when the file is big, and there is lets
    > say more than a 100 rows, the screen goes jumping for a few seconds
    > while the macro is being executed. I know it can be explained by the
    > fact the program is a cycle, but is there anything I can do so that the
    > screen doesn't jump?
    >
    >
    > --
    > Turquoise_dax
    > ------------------------------------------------------------------------
    > Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
    > View this thread: http://www.excelforum.com/showthread...hreadid=553777
    >
    >


  4. #4
    Registered User
    Join Date
    06-07-2006
    Location
    Montreal
    Posts
    73
    Thanx, really works wonders... (I might be relatively ungifted for programming, but I should have though about this one!)

    Thanx!

+ 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