In my macro code and worksheet code I have written application.screenupdating = false but this is not working rather giving me true result at any point in debug mode.
In my macro code and worksheet code I have written application.screenupdating = false but this is not working rather giving me true result at any point in debug mode.
If possible please show your full code![]()
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Does not give or produce any value. It merely stops your screen from flicking while the code is running.![]()
Please Login or Register to view this content.
issue.png
please find the attached image. The screenupdating is not changing into false
What is the error message shown before clicking the debug button?
Can you please enable the Locals Window in View Menu so that we can see what the X is having![]()
There is no error in the code. i am just trying to say that screenupdating is not updating to false even after passing false value to it.
Refer Post #3 description once again....
application.screenupdating = false
Is jut used to turn off the screen flickering which will make the code to run faster and it is used to speed up the performance of the macro alone![]()
Yes I totally understand this fact . But screen flickering is there on any cell selection even if target address is different for selection change worksheet event.
Sorry I am unable to follow you![]()
I mean I have written a code for Worksheet_selectionchange event. In that code if we select the targeted cell then it will call some macro in it. So every time when I select any cell in that worksheet the screen flickers. So, I need to stop that flickering.
Sometimes me too experienced that with Worksheet Events but adding that screenupdating = false code made it to flicker even more with the Worksheet Change Event. So I just stopped using screenupdating = false with worksheet events.
Like you me too don't know the solution for this![]()
Ok will try to find any solution.Thanks anyways
![]()
Don't worry now I call for all members help for this issue and just wait for some time![]()
Hi - what is the code in your selectionchange event?
Please post a sample workbook with all the code; no pictures please.
ScreenUpdating = False doesn't work when you step through the code. I guess the point is, if you're stepping through the code, you want/need to see what effect it is having on the worksheets.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
@ TMShucks - good point.
You can check if screenupdating is being properly applied using a watch (i.e. if you hover over the property in your code in break mode, it will show as true, in the watch window it will show false) (I think!)
Just out of curiosity, why this code is creating lot of screen flickering on my screen eventhough the the Screen updating is turned off?
Please don't suggest Rows("3:18").Delete method I just wanted to show an example...
Just looking for an answer for this behavior![]()
Please Login or Register to view this content.
![]()
Because you're making changes in a change event without disabling event handling.
@ sixthsense, it is because it recursively triggers. So when you delete a row, the change event runs again but as target is not A1 it skips to the end and turns screenupdating on again.
either disable events or put the screenupdating within the if statement.
At the risk of hijacking this thread, your code should be:
![]()
Please Login or Register to view this content.
Regards, TMS
@ TMShucks & yudlugar,
Thanks to both for giving solution for my longstanding doubt![]()
If you will call Application.Screenupdating = True, the screen will redraw even when it does not need to. It is better to only turn off screenupdating when necessary. If you test the Target cell in the code, you may only turn off screenupdating after the test is passed and only turn it back on inside the test block. For example, do not use:
but use:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by Izandol; 01-28-2014 at 07:58 AM.
- Please remember to mark threads Solved with Thread Tools link at top of page.
- Please use code tags when posting code: [code]Place your code here[/code]
- Please read Forum Rules
@ Izandol,
Thanks for the brief with sample codes![]()
Thanks for the rep.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
New quick method:
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Or you can use this way:
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks