Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave, I think you've identified a factor with this as well. As the page is
formatted to print to fit -- across all 5500 rows, with the assumption that there will normally be no more that 50 or so left unhidden. But I start with 5500 rows unhidden, and pull out one line at a time. I will look into. Thanks!! "Dave Peterson" wrote in message ... (Saved from a previous post) Do you see the dotted lines that you get after you do a print or print preview? If you do Tools|Options|view tab|uncheck display page breaks does the run time go back to normal? You may want to do something like: Option Explicit Sub testme() Dim CalcMode As Long Dim ViewMode As Long Application.ScreenUpdating = False CalcMode = Application.Calculation Application.Calculation = xlCalculationManual ViewMode = ActiveWindow.View ActiveWindow.View = xlNormalView ActiveSheet.DisplayPageBreaks = False 'do the work 'put things back to what they were Application.Calculation = CalcMode ActiveWindow.View = ViewMode End Sub Being in View|PageBreak Preview mode can slow macros down, too. Larry Adams wrote: I have an apllication where I examine 5500 rows to see if empty and, if so, "Hide" the row. Otherwise, "Unhide". After this macro has been run a few times, the macro slows to a crawl. My hypothesis is that Excel's internal "Undo" feature is tracking these changes and I am filling up memory set aside for "Undo"s -- which, then causes Excel to clear the oldest entry in the stack in order to add the next. At which point it crawls. I've seen this outside of VBA in Exel proper when I go to do a "Find and Replace All" on a large data retrieval area. The replace zips along fine, then slows, then crawls. I'm wondering if my VBA "Unhide"/"Hide" code is running into something similar. Hope I've described the symptoms well enough. Any ideas would be welcome. Thanks. -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Turn off "CALCULATE" on bottom of Excel worksheet. near "Ready" | Excel Discussion (Misc queries) | |||
"internal margin" and axis offsets (excel 2007) | Charts and Charting in Excel | |||
"Out of Stack Space" Macro Error | Excel Discussion (Misc queries) | |||
Run time error - "out of stack space" | Excel Programming | |||
Run Time Error "28" - Out of stack space? | Excel Programming |