|
-
May 2nd, 2005, 09:28 AM
#1
Thread Starter
Lively Member
i've heard that you can freeze screen while running macro to gain time
but i don't know how to do
Last edited by writelearner; May 3rd, 2005 at 12:40 AM.
-
May 2nd, 2005, 11:12 AM
#2
Re: i've heard that you can freeze screen while running macro to gain time
I think its only in Excel, but here is how you do it.
VB Code:
'To turn off updating to gain speed.
Application.ScreenUpdating = False
'To turn it back on.
Application.ScreenUpdating = True
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2005, 02:01 PM
#3
Addicted Member
Re: i've heard that you can freeze screen while running macro to gain time
as RobDogg said, the screenUpdating is the way to go, but is Excel only.
i use this, but at the end of the loop i enable it to let the user see that the spreadsheet is actually doing something as if you have a long loop, the user sometimes thinks its crashed and will quit the app.
so at the beginning of the time consuming loop, disable, and at the end of the loop enable, thus giving an intermittent update of the screen.
HTH
if you fail to plan, you plan to fail
-
May 3rd, 2005, 12:40 AM
#4
Thread Starter
Lively Member
Re: i've heard that you can freeze screen while running macro to gain time
-
May 3rd, 2005, 07:45 AM
#5
Re: i've heard that you can freeze screen while running macro to gain time
If you are using a userform, you can update a label caption with info like percentage complete, which you only need to update every three seconds. This lets the user see that the app is doing something. If you decide to do this, use DoEvents after updating the caption, or the window will not refresh.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|