PIZZADOMU.INFO

Get her screenupdating vb6 turn off ... encantan....... Why







VBA Application.ScreenUpdating statements in nested procedures

THIS IS A REPEAT POSTING AS I RECEIVED NO REPLIES FROM "office.developer.automation". I am writing Word VBA (Sub) procedures that call other (Sub and Function) procedures - and I want to stop the (Word) screen from jumping about whilst they run. The Help page for ScreenUpdating Property says that it "controls most display changes on the monitor WHILE A PROCEDURE IS RUNNING." [my quotes and CAPS]. This potentially raises three questions: If I set 'Application.ScreenUpdating = False' in one procedure and it subsequently calls another (nested) procedure: 1- does the status of ScreenUpdating remain 'False'; 2- or is ScreenUpdating restored (to 'True') as focus switches from the (primary) calling procedure to the called procedure? Also, given that either of the above statements is correct: 3- is the status of ScreenUpdating restored to "False" (as I set it above) when focus returns from the called procedure to the calling (primary) procedure? Using a Watches window in the Visual Basic Environment to observe the state of Application.ScreenUpdating would seem to indicate to me that the answers to my questions (above) are 1-No; 2-Yes; 3-No. Could some knowledgable person please explain how Application.ScreenUpdating works amongst nested VBA procedures - and - how I can control it from the start-to-the-finish of the primary procedure? Many thanks in advance, Paul J
=?Utf-8?B?UGF1bCBK?=

7/18/2007, 10:40:01 AM

Screen updating runs at the application level and should carry through all nested procedures. Once you have set it to False that should remain in effect until you explicitly set it back to True. I use it commonly in Excel to both remove that 'flicker' and to substantially speed up complex processing. That being said, I have been able to test it and noticed a difference between Excel and Word. In Word it appears that the screen updating setting is reset whenever your particular stream of code finishes executing. For example i can throw up a stream of message boxes and verify that the screen does not update. However, if I load up a userform and wait for user input, the screen behind refreshes. This is not the case in Excel. Sorry that this is not much help. But all I can suggest is that, if you can, collect all the information for your primary procedure up front from the user and do not pause the process. -- Les Torchia-Wells "Paul J" wrote: > THIS IS A REPEAT POSTING AS I RECEIVED NO REPLIES FROM > "office.developer.automation". > > I am writing Word VBA (Sub) procedures that call other (Sub and Function) > procedures - and I want to stop the (Word) screen from jumping about whilst > they run. > > The Help page for ScreenUpdating Property says that it "controls most > display changes on the monitor WHILE A PROCEDURE IS RUNNING." [my quotes and > CAPS]. > > This potentially raises three questions: > > If I set 'Application.ScreenUpdating = False' in one procedure and it > subsequently calls another (nested) procedure: > 1- does the status of ScreenUpdating remain 'False'; > 2- or is ScreenUpdating restored (to 'True') > as focus switches from the (primary) calling procedure to the called > procedure? > > Also, given that either of the above statements is correct: > 3- is the status of ScreenUpdating restored to "False" (as I set it above) > when focus returns from the called procedure to the calling (primary) > procedure? > > Using a Watches window in the Visual Basic Environment to observe the state > of Application.ScreenUpdating would seem to indicate to me that the answers > to my questions (above) are 1-No; 2-Yes; 3-No. > > Could some knowledgable person please explain how Application.ScreenUpdating > works amongst nested VBA procedures - and - how I can control it from the > start-to-the-finish of the primary procedure? > > Many thanks in advance, > > Paul J
=?Utf-8?B?TGVz?=

7/24/2007, 4:22:01 PM

Dear all In my excel file there are two sheets: A and B B is very hidden in my vba code I am in sheet A and I need to insert a value in Sheet B then: Application.ScreenUpdating =3D False Sheets("B").Visible =3D xlSheetVisible .. .. .. Sheets("B").Visible =3D xlSheetVeryHidden Application.ScreenUpdating =3D True But I can see the macro running (for one second I can see the sheet B visible...) How can I solve this problem? Thanks! Andr=E9.

gatarossi
When using vba and adding numerous formulas to the worksheet the screen shudders when each calculation is inserted. The VBA has 1. Screenupdating turned off 2. Calculation turned to manul 3. No Excel events that are triggering. Does anyone have any idea as to any other reasons? Thanks for your consideration.

Geoff
I have "borrowed" subroutines from this site (that work beautifully) that have: ScreenUpdating = False <code that changes the values of cells here> ScreenUpdating = True I was wondering what setting the ScreenUpdating to false and back to true is doing for me. I looked in Excel help (it was no help). I would love a simple (I'm not an advanced user) explanation. Thank you, Judy

=?Utf-8?B?SnVkeSBXYXJk?=
Hi, In Word i wrote vba code. A user selects a GraphType. The Graph will be added automatically to the document. The the code with change the layout to company style. It works fine! But all changes (>100!) are immidiately updated on the screen. How can i stop and start the ScreenUpdate of MSGraph in a VBA procedure? Thanks.

=?Utf-8?B?V2FyZA==?=
Application.ScreenUpdating = False seems to have no effect under excel 2003. This worked under 97.

=?Utf-8?B?RXJpbg==?=
Hi! OWC9/Win 2000. I use OWC9 client side to generate reports from our companies databases. The problem is that I need to suspend screen updating while the report is being loaded (else the user has to watch all the rows scroll by). How is this done? Regards PO

PO
I am fairly new to .net programming. In VBA there is a screenupdating = True or False command that stops the flicker on the screen while processing is occuring. I have tried but cannot find documentation or help on this in VB.net. Is there a code for this in .net? Thank you.

=?Utf-8?B?QmlsbHkgQg==?=
Does anyone know of a way of programming PowerPoint with the equivalent of application.screenupdating = false I've just spent hours trawling to try and find a solution, but so far have been unlucky. If anyone knows how to do it I'd be really happy! Many thanks Aehan

=?Utf-8?B?YWVoYW4=?=
I would like to place Application.ScreenUpdating = False in a workbook in such a way that it will have a global effect. I have approximately 35 worksheets that are calculating variables dependant on cell contents, applying formats, and several other things. When a set of data is modified on one worksheet, that sheet "hangs" for a couple of seconds and then flashes rapidly while the calcs are performed on each of the various cell ranges. I would love to avoid having to add the screenupdating variable to each individual page by calling it from the "This Workbook" item in the Visual Basic explorer. 1. Is this possible? 2. Can I just use Application.ScreenUpdating = False Application.ScreenUpdating = True with nothing in between them?

=?Utf-8?B?Rmxlb25l?=
Hello I want to set Screenupdating = False before saving, because i've got 12 sheets with aprox. 1000 rows, and i see the sheet changing while saving. I did like this and it dosent work: Private Sub Workbook_BeforeSave() Application.ScreenUpdating = False End Sub How do i turn on Screenupdating after saving ? Kind Regards Claus

Claus
Hi, I am trying to set Screenupdating = False in an Office 2000 Excel app. I am porting code from regular 2000 VBA to a Com Add-in and it will simply not turn off screenupdating after it's compiled. I have set a global object variable: Set hostApp = Application hostapp.Screenupdating = false does not work. neither does the usual Application.Screenupdating = false I am really in a bind if I can't get this to work. I have a 30 page interlinked spreadsheet and the user cannot see all of those pages flying by and gyrating. HELP! Thanks. Leonard

Leonard Golub
To speed up a macro that renames and sorts worksheets, I used the application.screenupdating=false function. VBA ignores the function though (verified through debugging. Anyone have any ideas?

Hans
We are running a VBA macro and are copying a range and then looping and inserting the copied range. However, the copied range has the "copy border". Is there anyway this can be turned off in vba? Also, we cannot turn off the screenupdaing using the following below with application .screenupdating = false .displayalerts=false end with We think it is updaitng due to a custom function in the range being copied Is there anything else that you can totally turn Excel updating off with. Thanks in advance

Bill
In Excel using VBA code Application.DisplayAlerts = False or Application.ScreenUpdating = False. I F8 step thru the code and watch the value of DisplayAlerts. It never reads False. Seems like it worked yesterday? Is there any setting that would stop this from working? Joe

=?Utf-8?B?Sm9lIGF0IEJhc28=?=
have a very long procedure which does many things. I set the first lin of my code to ActiveWorkbook.Application.ScreenUpdating = False Usually when I have done this the user does not see all the scree flickering and the actions of your procedure but for this one you se all of that. How can I set this so that the user does not see all o the Screen Updating and when they click All Done they can continu working? Thanks ActiveWorkbook.Application.ScreenUpdating = False Application.DisplayAlerts = False ActiveSheet.Unprotect Application.Run ("MoveLongQuoteData") Sheets(Array("Final Long Quote")).Select Sheets("Final Long Quote").Activate Application.Run ("Unhide") Application.Run ("pic") Application.GoTo Reference:="R2:R64000" Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks: _ False, Transpose:=False Application.CutCopyMode = False Sheets("Long_Quote").Select ActiveSheet.Protect Application.Run ("FitFormsRowSize_Long_Quote") Application.Run ("DeleteLongQuoteRows") Application.Run ("SetLongQuote_Autonumber") Application.Run ("LongQuote_AddPageBreaks") Application.Run ("FormatFinalLongQuote") Application.DisplayAlerts = True ActiveWorkbook.Application.ScreenUpdating = True MsgBox "All Done -- Message posted from http://www.ExcelForum.com

DoctorV <
I am writing Word VBA (Sub) procedures that call other (Sub and Function) procedures - and I want to stop the (Word) screen from jumping about whilst they run. The Help page for ScreenUpdating Property says that it "controls most display changes on the monitor WHILE A PROCEDURE IS RUNNING." [my quotes and CAPS]. This potentially raises three questions: If I set 'Application.ScreenUpdating = False' in one procedure and it subsequently calls another (nested) procedure: 1- does the status of ScreenUpdating remain 'False'; 2- or is ScreenUpdating restored (to 'True') as focus switches from the (primary) calling procedure to the called procedure? Also, given that either of the above statements is correct: 3- is the status of ScreenUpdating restored to "False" (as I set it above) when focus returns from the called procedure to the calling (primary) procedure? Using a Watches window in the Visual Basic Environment to observe the state of Application.ScreenUpdating would seem to indicate to me that the answers to my questions (above) are 1-No; 2-Yes; 3-No. Could some knowledgable person please explain how Application.ScreenUpdating works amongst nested VBA procedures - and - how I can control it from the start-to-the-finish of the primary procedure? Many thanks in advance, Paul J

=?Utf-8?B?UGF1bCBK?=
When I double-click an Excel file, Excel is launched but with screenupdating off. All I see is a gray background under the menu bar. This happens for all Excel files, regardless of whether they have any macros. Does anybody know what causes this behavior? My workarounds: 1. Launch Excel first, then open the file. 2. Launch the VBA editor and set screenupdating to true. These work OK, but I'd really like to solve the problem. I'm running Windows XP sp2 and Excel 2002 sp3. -Jon

Jon Crowell
Hey All, I was recently handed a C# COM addin created within Visual Studio 2003 that is for MS Word 2003 . The issue is that if MS Word is the Mail Editor, a Word file that is an attachment is opened from Outlook and edits are performed, the screen in MS Word stops updating. I am not seeing the same behavior on my system but there are a number of systems that are apparently seeing this behavior. I asked them to deselect all addins for Word and Outlook prior to opening the attachment and it apparently still happens. I have also noted that the addin does not have a COM shim. Has anyone encountered this before? If so, how was it resolved? Thanks & Regards, TC

TCook
http://webgroups.net/VBA-Application.ScreenUpdating/I8PNsHh