Making the new output workbook invisible will crash the program during some operations, but making the macro workbook invisible after adding the new output workbook seems to suppress all but one flicker, and it preserves the Status Bar display. I'm having issues with a workbook not changing view to a newly unhidden/activated worksheet in-between toggling screen updating from off to on and back off again - it's not actually refreshing the screen. To make sure this is efficient going forward, I want to prevent that from happening. Enable Events = False Dim bk As Workbook Dim result As Long Dim a WB As Workbook Dim a WS As Worksheet Set a WB = Active Workbook Set a WS = Active Workbook.
Screen Updating is turned on outside of the procedure.
- Try this at the beginning of your procedure: This solved my flicker problem, but I didn't like how the excel application disappeared completely then suddenly reappeared for the user.
Without a code sample it is very dificult to understand your problem (please see https://stackoverflow.com/help/how-to-ask and edit your question appropriately.
Here are some ideas: - Check if your code calls for code in a different procedure, maybe the Application.
It’s not as fast as it used to be and it can begin to get pretty frustrating waiting a long time for your code to finish. Color = vb Black Else ' else, color the cell light gray cell. If you think about it, if there were of the screen to process, it should run faster, right? Now it should make sense why it’s a good idea to turn off Public Sub Add Content To Sheet() Application. Color = vb Black Else ' else, color the cell light gray cell.
If this sounds like you, then Public Sub Add Content To Sheet() Dim start Time As Double start Time = Timer Dim r As Excel. Range("A1: P30") Dim i As Long Dim repeat As Long Dim cell As Excel. Try this out: shrink your Excel workbook window to a smaller size and run the code again. Screen Updating = False Dim start Time As Double start Time = Timer Dim r As Excel. Range("A1: P30") Dim i As Long Dim repeat As Long Dim cell As Excel. (code below) I have module that calls forms and subs from a main sub to carry out a number of tasks - within each of the subs (except the main) I turn off screen updating in the beginning and turn it on at the end (example below). The workbook has a number of worksheets (mostly hidden) that are used for processing or as the final visible view - when opened, only one sheet is visible (used to launch the main sub). Range For repeat = 1 To 30 For Each cell In r cell. Value Mod 2 = 0) Then ' if i is even, color the cell white cell. Range For repeat = 1 To 30 For Each cell In r cell. Value Mod 2 = 0) Then ' if i is even, color the cell white cell. I've got a massive bit of code running that takes 30 mins to run and I have it set so that screen updates set to false while most of the code runs but every now and again I turn it to true and straight back to false.I’ve seen the threads on this subject that recommend “fiddling with the code” or “calling the code in a subroutine”.