Question about screen flicker

dave8

Active Member
Joined
Jul 8, 2007
Messages
275
I have an application that uses forms for input and worksheets as data tables. The code looks something like this:

Application.Screenupdating = False
Sheets("Sheet1").visible = True
Sheets("Sheet1").activate
' update some rows within sheet1...
..
..
Sheets("Sheet1").visible = False
Application.Screenupdating = True


There are a bunch of code similar to this with muliple sheets being selected for update throughout the application within the Application.Screenupdating. The problem is that I see the sheets flickering in the background while the form is running. I thought the Application.Screenupdating = false suppress this. Any advice?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
It probably does suppress it but maybe you have a lot of formulas or charts or pivot tables in your workbook that you are not divulging with your question that could be a contributing factor. Or maybe timer code. Or maybe you don't need to unhide or select the sheets to do whatever you are doing. You said "forms for inputs" and if that means a bunch of controls on a bunch of worksheets, that will slow things down. If you give moer detail about your situation it will help people reading this to get a handle on what you are working with.
 
Upvote 0
i think it only runs in the current module, changing code subs automatically cancels it.

if your code looks at other pages, you can get worksheet activate events, which if you programme right you can use application.enableevents = false (with care)

one of my work files flickers on a timer, I decided it allowed users to see it was actually working, so some has a use
 
Upvote 0
If you are calling other macros that do not contain the screen update-false, that could also be a cause.
 
Upvote 0
I'm not using any charts or timers, but I do have formulas. What I'm saying is for all the areas in which the application is performing an update in a worksheet, I turned off the Screenupdating. My understanding is that if I have to write in a worksheet, that worksheet must be selected. Is that correct? Thus....

Application.Screenupdating = False
Sheets("Sheet1").Visible = True
Sheets("Sheet1").activate <------- do I need to do this?
Sheets("Sheet1").Range("A1").value = "Orange"
Sheets("Sheet1").Range("E2:E6").select
Selection.clear
Application.Screenupdating = True
 
Upvote 0
Why don't you just do this without unhiding the sheet or selecting the ranges?

Application.ScreenUpdating = False
With Sheets("Sheet1")
.Range("A1").value = "Orange"
.Range("E2:E6").Clear
End With
Application.ScreenUpdating = True
 
Upvote 0
Thank you. I didn't know that could be done. I'll change the statements and see if I notice any difference.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top