+ Reply to Thread
Results 1 to 3 of 3

Protected Sheet Problem in Excel 2000

  1. #1
    JG Scott
    Guest

    Protected Sheet Problem in Excel 2000

    I have built an automated workbook application that contains the
    following code:

    Private Sub Workbook_Open()

    On Error Resume Next

    ThisWorkbook.Worksheets("Planning").Protect _
    Password:="atom", UserInterfaceOnly:=True

    ThisWorkbook.Worksheets("Planning").EnableSelection = xlUnlockedCells

    ThisWorkbook.Worksheets("Sales").Protect _
    Password:="atom", UserInterfaceOnly:=True

    ThisWorkbook.Worksheets("Sales").EnableSelection = xlUnlockedCells

    Application.ActiveWorkbook.Protect Password:="atom", Structure:=True

    Sheets("Sales").Range("h3").Select

    End Sub

    It works fine for me, but another user can not see the cell border of
    his selection highlighted on the "Planning" sheet. Does anyone know
    why this would be and how to correct?

    Thanks.

    John Scott


  2. #2
    Tom Ogilvy
    Guest

    Re: Protected Sheet Problem in Excel 2000

    I have seen that behavior and activating the sheet first before applying the
    protection fixed it for me.

    Private Sub Workbook_Open()

    On Error Resume Next
    Application.ScreenUpdating = False
    With ThisWorkbook.Worksheets("Planning")
    .Activate
    .Protect _
    Password:="atom", UserInterfaceOnly:=True
    .EnableSelection = xlUnlockedCells
    End With
    With ThisWorkbook.Worksheets("Sales")
    .Activate
    .Protect _
    Password:="atom", UserInterfaceOnly:=True
    .EnableSelection = xlUnlockedCells
    End With
    Application.ThisWorkbook.Protect Password:="atom", Structure:=True

    ThisWorkbook.Sheets("Sales").Range("h3").Select
    Application.ScreenUpdating = True
    End Sub

    --
    Regards,
    Tom Ogilvy

    "JG Scott" <[email protected]> wrote in message
    news:[email protected]...
    > I have built an automated workbook application that contains the
    > following code:
    >
    > Private Sub Workbook_Open()
    >
    > On Error Resume Next
    >
    > ThisWorkbook.Worksheets("Planning").Protect _
    > Password:="atom", UserInterfaceOnly:=True
    >
    > ThisWorkbook.Worksheets("Planning").EnableSelection = xlUnlockedCells
    >
    > ThisWorkbook.Worksheets("Sales").Protect _
    > Password:="atom", UserInterfaceOnly:=True
    >
    > ThisWorkbook.Worksheets("Sales").EnableSelection = xlUnlockedCells
    >
    > Application.ActiveWorkbook.Protect Password:="atom", Structure:=True
    >
    > Sheets("Sales").Range("h3").Select
    >
    > End Sub
    >
    > It works fine for me, but another user can not see the cell border of
    > his selection highlighted on the "Planning" sheet. Does anyone know
    > why this would be and how to correct?
    >
    > Thanks.
    >
    > John Scott
    >




  3. #3
    JG Scott
    Guest

    Re: Protected Sheet Problem in Excel 2000

    Thanks, Tom.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1