#1   Report Post  
Michael
 
Posts: n/a
Default 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   Report Post  
GaryDK
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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   Report Post  
Michael
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linnking Updating Doug Links and Linking in Excel 3 February 23rd 05 11:44 PM
Screen updating Mark Stephens Charts and Charting in Excel 0 February 18th 05 03:55 PM
Change color of startup screen Search Excel Discussion (Misc queries) 0 February 12th 05 06:47 PM
how do i centre headings accross the screen in excell? Sethius Excel Discussion (Misc queries) 1 February 1st 05 10:46 AM
Help screen NEWBIE From NOVA SCOTIA Excel Discussion (Misc queries) 1 December 21st 04 01:07 AM


All times are GMT +1. The time now is 06:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"