How To Protect N8?

How to protect a sheet on Microsoft Excel 2007 using a macro with a password?

  • So, I ran a macro in which in the end I told it to protect the sheet using a password. When I ran the macro all it did was protect the sheet without a password. So my question is that how can I run a macro and have it protect the sheet using a password.

  • Answer:

    Use the following    ActiveSheet.Protect password:="myPwd" Note: ActiveSheet is only an object, you can use object like ThisWorkBook or Sheets(1), Sheet("Sheet1") etc Hope this helps

Aru at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.