Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Limit Visibility of a worksheet

I have multiple sheets in a workbook.
I want to limit the visibility of 2 of the sheets so that you have to have a
password to view them.

How do I go about doing this.

Thanks in advance,
Travis Dahlman
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Limit Visibility of a worksheet

One way, using macros:

Paste these in a VBA module in your workbook. Change the sheet names and
password as desired.

Sub HideSheets()
Sheets("Sheet2").Visible = xlSheetVeryHidden
Sheets("Sheet3").Visible = xlSheetVeryHidden
End Sub

Sub UnhideSheets()
Dim ret
Const Pwd = "tTyY7&uU"
ret = InputBox("Password to unhide sheets", "Unhide Sheets")
If ret = Pwd$ Then
Sheets("Sheet2").Visible = xlSheetVisible
Sheets("Sheet3").Visible = xlSheetVisible
End If
End Sub

These macros could be called from buttons on another sheet. You should also
password protect the VBAProject for the workbook. This will prevent most
users from seeing the sheets or the pasword, but the security in an Excel
workbook is far from unbreakable once the workbook is open.

Hope this helps,

Hutch

"Tdahlman" wrote:

I have multiple sheets in a workbook.
I want to limit the visibility of 2 of the sheets so that you have to have a
password to view them.

How do I go about doing this.

Thanks in advance,
Travis Dahlman

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
Add-In Visibility Trent Argante Excel Discussion (Misc queries) 5 February 13th 08 08:01 PM
Textbox text visibility bcelestia Excel Discussion (Misc queries) 2 January 11th 07 08:47 AM
Custom Toolbar Visibility RCW Excel Discussion (Misc queries) 2 October 26th 06 05:39 PM
Toggling Visibility of items with VBA SpielbergRules Excel Worksheet Functions 3 July 2nd 06 06:12 PM
Visibility of active cell. gjanssenmn Excel Discussion (Misc queries) 1 October 4th 05 06:24 PM


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"