Sabtu, 23 Juli 2011

RE: [ExcelVBA] Re: Freeze Window

 

When I create the master macro, and it contains steps to open a file which
runs a macro containing freeze updating steps, this (called) macro usually
ends by turning screen updating on. When control is returned to the master
macro, the next instruction should be to turn screen updating off. Again,
a minor point, but useful in some cases.

Regards,
Bill Simpson
PMO Emerging Programs
972-952-2573

From: "VisioMVP" <VisioMVP@magma.ca> <ExcelVBA@yahoogroups.com>
Date:07/21/2011 11:37PM RE: [ExcelVBA] Re: Freeze Window
Sent by:
ExcelVBA@yahoogroups.com
>----------------------------------------------------------|

If you have full control of your macro, then there is no problem. The
problem arises when your macro becomes a step in a series of macros.
Overall, the person who created the "master" macro wants screen updating
off, so when they get to your macro, you turn off screen updating (again)
when you start, but you turn it back on when you finish. The opposite
condition to what you started with.

It is just a matter of respecting the conditions you start with. As I said,
it is a minor point and most of the time, it does not matter.

John. Visio MVP

From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf
Of noskosteve
Sent: July-21-11 11:22 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] Re: Freeze Window

John,

I do this all the time and don't understand your tip. Since I am in control
of my macro and updatinog, I turn it off when a long macro is doing screen
ops, then turn it on when the macro finishes - this way it runs faster,
then, I see the results when it finishes.
Even if it was off to start, I still want to see the results.
Steve

--- "VisioMVP" <VisioMVP@...> wrote:
>
> One minor point. Rather than setting ScreenUpdating to True at the end,
you
> should save the current state and then restore it when finished. If
> ScreenUpdating is false before you start, then you would be altering
things.
>
> John. Visio MVP
>
> From: mickey11030>
> Thanks all; that will be a big help.
>
> --- William D Simpson <w-simpson1@> wrote:
> >
> > Application.ScreenUpdating = False '.to stop screen updating
> > Your code here
> > Application.ScreenUpdating = True '..to allow screen updating

> > Regards, Bill Simpson PMO Emerging Programs 972-952-2573

> > From: "mickey11030"

> > I seem to remember hearing about a command to stop the window from
> updating
> > to speedup a long running macro. Does anyone remember what that command
> is?

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar