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: 52
Default How to Store Passwords To Multiple Sheets and To Retain thatPasswords When the Workbook IS closed

i need a code to store password to multiple sheets and to retain that
passwords when i closed the workbook. according to my code it can
assigns a password but cannot retain the multiple passwords assigned
to multiple sheet .

Sub ProtectAll()

Pwd = InputBox("Enter your password to protect all worksheets")
If Pwd < "" Then
FormobjWSht_Input.Protect Password:=Pwd
Else
Exit Sub
End If

End Sub

Sub UnProtectAll()
'Dim Pwd As String

Pwd = InputBox("Enter your password to unprotect all worksheets",
"Password Input")
If Pwd < "" Then
On Error Resume Next
FormobjWSht_Input.Unprotect Password:=Pwd
If Err < 0 Then
MsgBox "You have entered an incorrect password. Worksheets could not "
& _
"be unprotected.", vbCritical, "Incorrect Password"
End If

 
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
Passwords for Multiple Users of Workbook Brandy Excel Discussion (Misc queries) 6 June 18th 09 07:22 PM
Import All Sheets from Closed Workbook ryguy7272 Excel Programming 10 July 3rd 07 08:57 AM
Change passwords Multiple sheets bbc1 Excel Discussion (Misc queries) 1 December 24th 05 02:00 AM
import all sheets from a closed workbook johnpetrusa Excel Programming 2 June 4th 05 11:24 PM
Accessing All Sheets in a closed workbook jwallace Excel Programming 4 May 20th 04 10:33 AM


All times are GMT +1. The time now is 02:11 AM.

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

About Us

"It's about Microsoft Excel"