Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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




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
Excel 2007 sheet and workbook protection Old Keith Excel Worksheet Functions 8 January 16th 17 07:15 AM
Individual sheet protection in shared workbook Sunil Pradhan[_2_] Excel Worksheet Functions 1 May 16th 10 03:51 AM
sheet and workbook protection Laundone Excel Discussion (Misc queries) 1 November 3rd 09 04:31 AM
Why does'nt sheet protection allow CTRL+PAGEUP/DOWN to work? rtm4833 Excel Worksheet Functions 0 March 15th 06 04:08 PM
work sheet protection taxrelief Excel Discussion (Misc queries) 1 July 20th 05 05:43 AM


All times are GMT +1. The time now is 05:43 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"