+ Reply to Thread
Results 1 to 4 of 4

sheet protection

  1. #1
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119

    sheet protection

    hi,
    I am very happy if somebody help me for writing a code to protect the sheet
    i mean first i wanted to unprotect the sheet by a password then i will have my own line of codes and finally i wanted to protect the sheet with the same password.
    password u can use 'xyz'.

    with regards
    nowal

  2. #2
    Damon Longworth
    Guest

    Re: sheet protection

    A good way to begin learning VBA syntax is using the macro recorder. Record
    the process of protecting and unprotecting. You can then insert this code
    into your routine.

    --
    Damon Longworth

    Don't miss out on the 2005 Excel User Conference
    Sept 16th and 17th
    Stockyards Hotel - Ft. Worth, Texas
    www.ExcelUserConference.com


    "nowfal" <[email protected]> wrote in
    message news:[email protected]...
    >
    > hi,
    > I am very happy if somebody help me for writing a code to protect
    > the sheet
    > i mean first i wanted to unprotect the sheet by a password then i will
    > have my own line of codes and finally i wanted to protect the sheet with
    > the same password.
    > password u can use 'xyz'.
    >
    > with regards
    > nowal
    >
    >
    > --
    > nowfal
    > ------------------------------------------------------------------------
    > nowfal's Profile:
    > http://www.excelforum.com/member.php...o&userid=10003
    > View this thread: http://www.excelforum.com/showthread...hreadid=387829
    >




  3. #3
    Kassie
    Guest

    RE: sheet protection

    Hi nowfal

    ActiveSheet.Unprotect Password:= "xyz"
    do your thing
    ActiveSheet.Protect Password:= "xyz"

    "nowfal" wrote:

    >
    > hi,
    > I am very happy if somebody help me for writing a code to protect
    > the sheet
    > i mean first i wanted to unprotect the sheet by a password then i will
    > have my own line of codes and finally i wanted to protect the sheet with
    > the same password.
    > password u can use 'xyz'.
    >
    > with regards
    > nowal
    >
    >
    > --
    > nowfal
    > ------------------------------------------------------------------------
    > nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
    > View this thread: http://www.excelforum.com/showthread...hreadid=387829
    >
    >


  4. #4
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119
    Hi ,

    I got the solution by searching an old thread in which Mr.ron and Mr.Tom oglivy had replied. The solution is as
    worksheets("sheetname").portect password:="password"
    add whatever the codes and all
    worksheets("sheetname").unprotected Password:="password"

    now my password will take care of the sheet.
    anyway thanks to Mr.ron and Mr.Tom
    with regards
    nowfal

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1