LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Can Turn Off Internal "Undo" Stack in VBA?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off "CALCULATE" on bottom of Excel worksheet. near "Ready" chrispal86 Excel Discussion (Misc queries) 2 February 2nd 10 08:36 PM
"internal margin" and axis offsets (excel 2007) jv_chile Charts and Charting in Excel 8 February 11th 08 05:31 PM
"Out of Stack Space" Macro Error Adam Excel Discussion (Misc queries) 3 July 2nd 07 07:10 PM
Run time error - "out of stack space" Tempy Excel Programming 2 February 16th 05 05:49 AM
Run Time Error "28" - Out of stack space? Tom Ogilvy Excel Programming 0 September 12th 03 04:43 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"