LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default protect sheet in VB

Hi,
I want to use the below line lock a sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

and assign a password.

then the macro will hide the sheet.
ActiveWindow.SelectedSheets.Visible = False

Another Macro will unhide the sheet and then unlock it
with a password prompt.
ActiveWindow.SelectedSheets.Visible = False
ActiveSheet.Unprotect
but this does not work. I cannot assign a password on
protecting.

any ideas?


 
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
Bug - Protect Sheet ? Kevin Excel Discussion (Misc queries) 0 January 23rd 08 08:13 AM
How to protect all sheet ? vumian Excel Worksheet Functions 6 August 4th 06 06:02 PM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Can I protect columns w/in a "List" using Protect Sheet? Diane Excel Discussion (Misc queries) 0 May 10th 06 03:30 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


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