ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is workbook / sheet protected (https://www.excelbanter.com/excel-programming/312822-workbook-sheet-protected.html)

Tim Marsden

Is workbook / sheet protected
 
Hi,

Is there a way (in code) to test if a workbook / sheet is protected, without
unprotecting it?

thanks
Tim



Frank Kabel

Is workbook / sheet protected
 
Hi
directly from the vBA help:
If Worksheets("Sheet1").ProtectContents = True Then
MsgBox "The contents of Sheet1 are protected."
End If


--
Regards
Frank Kabel
Frankfurt, Germany

"Tim Marsden" schrieb im Newsbeitrag
...
Hi,

Is there a way (in code) to test if a workbook / sheet is protected,

without
unprotecting it?

thanks
Tim




Peter Huang

Is workbook / sheet protected
 
Hi Tim,

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.



All times are GMT +1. The time now is 02:04 PM.

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