• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to protect sheets?

KishorKK

Member
Hi All,

I want to protect like 5 sheets at a time for that how to write a program?

for a single one

sub protect()
sheets("sheet1").protect password:= 123

remaining ones how?
 
Hello Kishore.

May be this.


Sub Protect_Sheets()

Dim ws as worksheets
For each ws in Activeworkbooks.sheets
ws.Activate
ws.protect password:=123
next ws

End sub

Hope this helps..Keep learning.
 
Back
Top