ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Proctect when closing (https://www.excelbanter.com/excel-programming/372365-proctect-when-closing.html)

TheRook

Proctect when closing
 
Can any of you nice people give me the script to protect sheet 1, with a
password when spreadsheet is close. Please highlight where I need to
populate the password with *'s

Thanks in advance

DaveyJones

Proctect when closing
 
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Protect Password:=" * "
End Sub
--
Dave


"TheRook" wrote:

Can any of you nice people give me the script to protect sheet 1, with a
password when spreadsheet is close. Please highlight where I need to
populate the password with *'s

Thanks in advance



All times are GMT +1. The time now is 07:52 AM.

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