Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Screen Updating
Hi All
I have struck a situation that hasn't happened before. I have a Macro running to Lock all Sheets in my workbook, (16 sheets in total). The Macro works fine except for screen updating. I have put Screen Updating=False at the beginning of the macro & Screen Updating = True at the end, but no matter what I try it still updates the screens on the fly. Whilst this is not a major issue, I am using an old Laptop and this really slows things down. The syntax is Ok as it was typed in lower case and accepted by VB. I have used this hundreds of times in the past with no problems. Any advice would be appreciated Regards Michael -- Michael Mitchelson |
#2
|
|||
|
|||
Hi Michael,
If by locking you mean protecting, this simple macro does it in the active workbook without needing to turn off screen updating - Sub LockSheets() Dim ws As Worksheet For Each ws In Worksheets ws.Protect Next ws End Sub Are you selecting each sheet? You don't need to. I hope this helps, Gary |
#3
|
|||
|
|||
Michael
Don't know if you have a typo or not, but proper syntax is.... Application.ScreenUpdating = False 'True Gord Dibben Excel MVP On Sun, 13 Mar 2005 20:49:03 -0800, "Michael" wrote: Hi All I have struck a situation that hasn't happened before. I have a Macro running to Lock all Sheets in my workbook, (16 sheets in total). The Macro works fine except for screen updating. I have put Screen Updating=False at the beginning of the macro & Screen Updating = True at the end, but no matter what I try it still updates the screens on the fly. Whilst this is not a major issue, I am using an old Laptop and this really slows things down. The syntax is Ok as it was typed in lower case and accepted by VB. I have used this hundreds of times in the past with no problems. Any advice would be appreciated Regards Michael |
#4
|
|||
|
|||
Thanks Guys
As always a great response. Gord......yeah just a typo, don't what has caused the problem, but I have taken the easy way out and adopted Garys suggestion and used his code. Mine was going through sheet by sheet, so was going to be naturally slower. Just what I need on an old Think Pad. Regards Michael "Gord Dibben" wrote: Michael Don't know if you have a typo or not, but proper syntax is.... Application.ScreenUpdating = False 'True Gord Dibben Excel MVP On Sun, 13 Mar 2005 20:49:03 -0800, "Michael" wrote: Hi All I have struck a situation that hasn't happened before. I have a Macro running to Lock all Sheets in my workbook, (16 sheets in total). The Macro works fine except for screen updating. I have put Screen Updating=False at the beginning of the macro & Screen Updating = True at the end, but no matter what I try it still updates the screens on the fly. Whilst this is not a major issue, I am using an old Laptop and this really slows things down. The syntax is Ok as it was typed in lower case and accepted by VB. I have used this hundreds of times in the past with no problems. Any advice would be appreciated Regards Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linnking Updating | Links and Linking in Excel | |||
Screen updating | Charts and Charting in Excel | |||
Change color of startup screen | Excel Discussion (Misc queries) | |||
how do i centre headings accross the screen in excell? | Excel Discussion (Misc queries) | |||
Help screen | Excel Discussion (Misc queries) |