Thread: Enter Key
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Enter Key

When you do Tools=Protect=worksheet, you have 3 choices. So there are
three properties to check (plus there is one more property that can be
protected, but only with code).

Worksheet object properties:
protectionMode
protectContents
protectscenarios
protectDrawingObjects

if any of them are true, then the sheet is protected.

--
Regards,
Tom Ogilvy


"bw" wrote in message news:opsessf8zmvzdmg1@bw...
Nick,

I discovered why "Unchecking" didn't work. The Sheet is Protected, and
"Unchecking" doesn't work when the sheet is protected.

Also, "If ActiveSheet.Protect = True Then" is always False.

Do you have a solution to this problem?

Thanks,
Bernie

On Thu, 23 Sep 2004 20:54:05 +0100, Nick Hodge
wrote:

Bernie

Unchecking should do it but...

You can certainly set this via code. This could either be in the
workbooks
open even or you could use it as a toolbar button and toggle it on/off
(as
per the code sample)

Sub moveAfterReturnNo()
If Application.MoveAfterReturn = False Then
Application.MoveAfterReturn = xlDown
Exit Sub
End If
Application.MoveAfterReturn = False
End Sub