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: 47
Default Password not working on exported Workbook / Worksheet.

Hi;

I have built a little spreadsheet project form a club I am a member of. I
have one sheet of the Workbook password protected in order to make some
hidden columns in accessable to anyone other than executive members. The
password protection works fine on my computer, but when I transfer the file
to other club members the are not asked for a pass word wen they open the
hidden columns. Below is the VBA code I use to lock and protect those
columns.

Sub ExecProtect()
'
' ExecProtect Macro
' Macro recorded 08/21/2006 by William Case
'

'


Worksheets("Member_List").Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterFaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=False, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=True, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

End Sub


Sub LockDef()

Sub BarLock()
'
' BarLock Macro
' Macro recorded 08/21/2006 by William Case
'
' Test and lock bar, address and fees columns
'

'
Worksheets("Member_List").Range("DataArea").Locked = False

Range(BarsToLock).Locked = True
Range(AddressToLock).Locked = True
Range(FeesToLock).Locked = True


End Sub



BarsToLock = "Bar1D,Bar2J,Bar3O,Bar4T,Bar5Y,Bar6AD,Bar7AI,Bar8A R,Bar9AZ"
AddressToLock = "Addresses"
FeesToLock = "Fees"

End Sub

Sub OpenAddresses()
'
' ExecProtect Macro
' Macro recorded 08/24/2006 by William Case
'

On Error GoTo OpenAddresses_Error

ExecUnprotect
Range(AddressToLock).Locked = False
UnHideAddresses
ExecProtect
'

On Error GoTo 0
Exit Sub

OpenAddresses_Error:
If Err.Description = "Method 'Range' of object '_Global' failed" Then
LockDef
Resume Next
Else
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
OpenAddresses of Module LockandProtectMod"
End If
End Sub

There is several other procedures to cover a complex range of possibilites.
They all work for me as they should. But the password 'bill' is not asked
for when this project is installed on another Excel using machine and another
user unhides hidden columns.

What have I missed?

Regards Bill

 
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
Worksheet, workbook password [email protected] Excel Worksheet Functions 1 December 11th 08 01:12 PM
Excel workbook password - not working JB Excel Discussion (Misc queries) 4 December 31st 07 05:48 PM
How do I password protect a single worksheet within a workbook f Lorne Excel Discussion (Misc queries) 1 July 3rd 07 05:21 AM
my password quit working in an excel workbook, help! Cheryl B Excel Worksheet Functions 0 April 26th 06 01:04 PM
Why am I prompted for the workbook password for each worksheet? Leon Excel Worksheet Functions 0 May 30th 05 01:43 PM


All times are GMT +1. The time now is 02:24 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"