LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default protect with password


hi,
the following code starts with unprote the sheet and end with protected
sheet, now the problem is anybody can unprotect the sheet and do
something in the sheet . to avoid that i wanted to protect the sheet
with my own password say 'nowfal'. Is it possible to do that . if so
please help me in this matter .


Sub FCY2()
'
' FCY2 Macro
' Macro recorded 15/07/2004 by Musandam
'

'
ActiveSheet.Unprotect
Sheets("BILL").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("RECORD").Select
Range("A2:AH12000").Select
Selection.Copy
Range("A3").Select
ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False,
_
IconFileName:=False
Range("C2:H2").Select
Selection.ClearContents
Range("J2:L2").Select
Selection.ClearContents
Range("N2").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=6
Range("O2:R2").Select
Selection.ClearContents
Range("T2:W2").Select
Selection.ClearContents
Range("Y2:AB2").Select
Selection.ClearContents
Range("AD2:AG2").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 1
Range("D2").Select
ActiveSheet.Protect DrawingObjects:=True, Scenarios:=True
ActiveWorkbook.Save
End Sub


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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Protect ub Excel Worksheet Functions 1 January 14th 09 04:46 PM
Password Protect Kelly Excel Discussion (Misc queries) 2 January 18th 07 09:52 PM
Password Protect cubsfan Excel Discussion (Misc queries) 0 April 7th 06 03:34 PM
Password Protect Dedrie Excel Worksheet Functions 0 August 19th 05 07:03 PM
password protect frank Excel Discussion (Misc queries) 2 March 21st 05 05:55 PM


All times are GMT +1. The time now is 12:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"