ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheet protection (https://www.excelbanter.com/excel-programming/334759-sheet-protection.html)

nowfal[_15_]

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


--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=387829


Damon Longworth

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" wrote in
message ...

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




Kassie

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



nowfal[_17_]

sheet protection
 

Hi ,

I got the solution by searching an old thread in which Mr.ron an
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
nowfa

--
nowfa
-----------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...fo&userid=1000
View this thread: http://www.excelforum.com/showthread.php?threadid=38782



All times are GMT +1. The time now is 07:39 AM.

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