Dear Subu,

First of all, welcome to the group, hope you have a good time here.
Secondly, please remember we all try to help each other in this group.
Therefore no question is a stupid question. Thirdly, even if you are a
novice, try to read the questions posted and try to start answering them to
the best of your ability. (You can also use google to help yourself). This
will also increase your knowledge.
This group is full of experts from every field, therefore everyone can learn
from everyone.

Now coming to your question. To make this code work,

1) you can directly open the VBA editor by fressing ALT+F11.

2) Next you have to Insert a "Module"

3) Paste the code by Paul in the module and save it. You can now close the
VBA editor.

4) When you locate your macros, you will see the two macros "Protect_all"
and "Unprotect_all"

5) You can now execute the macros as you normally do with the macros you
have recorded.

Please let me know if you need further help.

Regards,
Andy




On Sat, May 23, 2009 at 12:36 PM, Subu S <mail_to_s...@yahoo.com> wrote:

>  Dear Members
>
> I'm new here. I'm amazed at the friendliness and Samaritan approach in this
> group. This place is excellent......
>
> I'm a novice and please bear with me...
>
> Question
> ---------------------
> Let us say I wish to use the macro below. What should I do ? where should I
> paste it on the XL sheet ? what commands should I use to make the macro run
>
> Other stats about me :
> ---------------------------------
> Win XP SP 3 user
> XL 2003 user
> I've recorded macros using "Record macro" facilities but never copied
> macros and used them
> I have _no_ VBA knowledge
>
> Thanks in advance
> best regards
> subu
>
>
>
> ==============================================================================
> TOPIC: Protect and unprotect all sheets
> http://groups.google.com/group/excel-macros/t/cf696d1ba47ebfa8?hl=en
>
> ==============================================================================
>
>
> == 2 of 3 ==
> Date: Thurs, May 21 2009 9:32 am
> From: Paul Schreiner
>
>
> WITH password or WITHOUT?
>
> Depending on what options you want on the "protect", you can use:
> '-------------------------------------------------------------------
> Option Explicit
> Sub Protect_all()
>     Dim pw_ent, sht
>     pw_ent = "test"
>     For Each sht In ThisWorkbook.Sheets
>         ThisWorkbook.Sheets(sht.Name).Protect _
>         DrawingObjects:=True, _
>         Contents:=True, _
>         Scenarios:=True, _
>         AllowFormattingCells:=True, _
>         AllowFormattingColumns:=True, _
>         AllowFormattingRows:=True, _
>         AllowInsertingColumns:=True, _
>         AllowInsertingRows:=True, _
>         AllowDeletingColumns:=True, _
>         AllowDeletingRows:=True, _
>         AllowSorting:=True, _
>         AllowFiltering:=True, _
>         AllowUsingPivotTables:=True, _
>         Password:=pw_ent
>     Next sht
> End Sub
> Sub Unprotect_all()
>     Dim sht, pw_ent
>     pw_ent = "test"
>         For Each sht In ThisWorkbook.Sheets
>             ThisWorkbook.Sheets(sht.Name).Unprotect Password:=pw_ent
>         Next sht
> End Sub
> '-------------------------------------------------------------------
> You should record a macro in which you protect a sheet with the appropriate
> permissions in order to know what options to use.
>
> hope this helps,
> Paul
>
>
>
>
> ------------------------------
> Get your new Email address!
> <http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/>
> Grab the Email name you've always wanted before someone else does!
> >
>

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to