View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default 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