Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.ScreenUpdating problem
Help!
Can't quite figure out why, but this code doesn't stop the screen from updating. As it cycles through the For statement, the screen's updating. Private Sub Workbook_Open() Dim sh As Worksheet Application.ScreenUpdating = False For Each sh In ThisWorkbook.Worksheets sh.Protect "unlock", , , userinterfaceonly:=True sh.EnableSelection = xlUnlockedCells Next sh Worksheets("DataWorksheet").Visible = False Worksheets("Information").Activate 'set page up for display GoToForm Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.ScreenUpdating problem
I ran your code and found no screen updating during the run.
However, I was not able to select ANY cells including the unlocked ones. since your code enables selection AFTER you have locked the sheets. Moving sh.EnableSelection = xlUnlockedCells to before the protect command solves this problem. "jkitzy" wrote: Help! Can't quite figure out why, but this code doesn't stop the screen from updating. As it cycles through the For statement, the screen's updating. Private Sub Workbook_Open() Dim sh As Worksheet Application.ScreenUpdating = False For Each sh In ThisWorkbook.Worksheets sh.Protect "unlock", , , userinterfaceonly:=True sh.EnableSelection = xlUnlockedCells Next sh Worksheets("DataWorksheet").Visible = False Worksheets("Information").Activate 'set page up for display GoToForm Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.ScreenUpdating problem
Thanks go. That helped with another problem I was having. I think I may have
found my screen updating problem, too. I have a sheet_deactivate event on my first page that activates other sheets and does stuff. I think what was happening was that as those sheets were activating, they were changing the screenupdating to True. How? Dunno. But, I put code in that allows me to check to see if the sheet_activate event comes from another macro and then doesn't perform the sheet_activate event if it does. Make sense? "gocush" wrote: I ran your code and found no screen updating during the run. However, I was not able to select ANY cells including the unlocked ones. since your code enables selection AFTER you have locked the sheets. Moving sh.EnableSelection = xlUnlockedCells to before the protect command solves this problem. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.ScreenUpdating problem
Happens to me all the time til I insert
Application.EnableEvents=True to turn off object change events out of the loop temporarily then reverse the above code. "jkitzy" wrote: Thanks go. That helped with another problem I was having. I think I may have found my screen updating problem, too. I have a sheet_deactivate event on my first page that activates other sheets and does stuff. I think what was happening was that as those sheets were activating, they were changing the screenupdating to True. How? Dunno. But, I put code in that allows me to check to see if the sheet_activate event comes from another macro and then doesn't perform the sheet_activate event if it does. Make sense? "gocush" wrote: I ran your code and found no screen updating during the run. However, I was not able to select ANY cells including the unlocked ones. since your code enables selection AFTER you have locked the sheets. Moving sh.EnableSelection = xlUnlockedCells to before the protect command solves this problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to set Application.ScreenUpdating = False for Gen use | Excel Discussion (Misc queries) | |||
Question on application.screenupdating | Excel Programming | |||
Application.screenUpdating = False | Excel Programming | |||
problem with Application.ScreenUpdating | Excel Programming | |||
Application.ScreenUpdating = False | Excel Programming |