![]() |
Workbook/sheet protection doesn't seem to work
I want to make it so the chart on a chart sheet can't be selected by the
user and I thought protecting the workbook and the worksheet (structure and windows) would do it, but it hasn't worked. ANyone know how to achieve this? Thanks for your help, Mark |
Workbook/sheet protection doesn't seem to work
Perhaps this will solve your problem:
Option Explicit Private Sub Workbook_SheetActivate(ByVal Sh As Object) 'Note: this macro must be stored in the Microsoft Excel Oject: ThisWorkbook Dim strShtName As String strShtName = ActiveSheet.Name If strShtName = "Chart1" Then 'Modify Sheet Name as required Chart1SheetHide MsgBox "You are not allowed to view Chart1" End If End Sub Sub Chart1SheetHide() 'Use this to Hide the Chart1 Sheet: Sheets("Chart1").Visible = False Range("H31:H33").Select End Sub Sub Chart1SheetUnHide() 'Use this to UnHide the Chart1 Sheet: Sheets("Chart1").Visible = True Range("H31:H33").Select End Sub Hope this helps. TTN JMMach, MOUS Master "Mark Stephens" wrote in message ... I want to make it so the chart on a chart sheet can't be selected by the user and I thought protecting the workbook and the worksheet (structure and windows) would do it, but it hasn't worked. ANyone know how to achieve this? Thanks for your help, Mark |
All times are GMT +1. The time now is 10:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com