ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protected Sheet Problem in Excel 2000 (https://www.excelbanter.com/excel-programming/348304-protected-sheet-problem-excel-2000-a.html)

JG Scott

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").EnableSelectio n = xlUnlockedCells

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

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

Application.ActiveWorkbook.Protect Password:="atom", Structu=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


Tom Ogilvy

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", Structu=True

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

--
Regards,
Tom Ogilvy

"JG Scott" wrote in message
ups.com...
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").EnableSelectio n = xlUnlockedCells

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

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

Application.ActiveWorkbook.Protect Password:="atom", Structu=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




JG Scott

Protected Sheet Problem in Excel 2000
 
Thanks, Tom.



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com