ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   protecting a sheet (https://www.excelbanter.com/excel-discussion-misc-queries/216651-protecting-sheet.html)

des-sa[_2_]

protecting a sheet
 
please help. is it possible to password protect only one sheet in workbook?
if so, could anyone please help. can i incorporate the script into an
existing macro?
thanks

Mike H

protecting a sheet
 
Try this

Sub Sonic()
'Do lots of things
Sheets("Sheet1").Protect Password:="Mypass"
End Sub

Mike

"des-sa" wrote:

please help. is it possible to password protect only one sheet in workbook?
if so, could anyone please help. can i incorporate the script into an
existing macro?
thanks


Gary''s Student

protecting a sheet
 
Sub Macro1()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub

--
Gary''s Student - gsnu200827


"des-sa" wrote:

please help. is it possible to password protect only one sheet in workbook?
if so, could anyone please help. can i incorporate the script into an
existing macro?
thanks


Luke M

protecting a sheet
 
From XL
Tools-Protection-Protect sheet

From VBA (w/ password)
Sub test()
Dim xPass As String
xPass = "MyPassword"
ActiveSheet.Protect Password = xPass
ActiveSheet.Unprotect Password = xPass
End Sub

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"des-sa" wrote:

please help. is it possible to password protect only one sheet in workbook?
if so, could anyone please help. can i incorporate the script into an
existing macro?
thanks



All times are GMT +1. The time now is 08:59 AM.

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