how do i minimize/maximize a workbook from vba? I want to minimize it
durring processing to speed things up a bit
how do i minimize/maximize a workbook from vba? I want to minimize it
durring processing to speed things up a bit
Record a macro when you do it manually (either the worksheet window or the
application window).
But I never thought that minimizing stuff would make the macro work faster.
But there are some other settings that can make your code work faster:
Application.ScreenUpdating = False
CalcMode = Application.Calculation
Application.Calculation = xlCalculationManual
ActiveSheet.DisplayPageBreaks = False
The first stops the screen flickering when you select different sheets (but it's
even better to not select sheets/ranges/objects).
The second & third line turns calculation to manual (and remembers the current
setting).
You'll want to turn it back to what it was before you started at the end:
Application.calculation = calcmode
And the last tells excel to not worry about where to show those dotted lines
(where page breaks would be). This is useful if your macro inserts/deletes rows
or columns.
Daniel wrote:
>
> how do i minimize/maximize a workbook from vba? I want to minimize it
> durring processing to speed things up a bit
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks