Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mike Stanley
 
Posts: n/a
Default Password protected workbooks

I have one master workbook that has sheets that are linked to 9 other
workbooks. The other 9 workbooks have individual passwords. When I open the
"master" workbook, I have to enter the other 9 workbook passwords. How do I
get around that? Anybody?
--
M.Stanley
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Password protected workbooks

Create the 11th workbook that opens the first 9 (supplying the password) and
then opens the master.

Is it ok to open those other workbooks?

Option Explicit
Sub testme()

Dim myFileNames As Variant
Dim myPWDs As Variant
Dim iCtr As Long
Dim testStr As String

'put all ten workbook names here
'end with the master workbook name
myFileNames = Array("C:\my documents\excel\book1.xls", _
"C:\my documents\excel\book2.xls", _
"C:\my documents\excel\master.xls")

'same with the passwords
myPWDs = Array("pwd1", _
"pwd2", _
"")

If UBound(myFileNames) < UBound(myPWDs) Then
MsgBox "design error!"
Exit Sub
End If

For iCtr = LBound(myFileNames) To UBound(myFileNames)
On Error Resume Next
Workbooks.Open Filename:=myFileNames(iCtr), Password:=myPWDs(iCtr)
If Err.Number < 0 Then
MsgBox myFileNames(iCtr) & " didn't open" & vbLf & "Quitting!"
Err.Clear
Exit Sub
End If
Next iCtr
End Sub



Mike Stanley wrote:

I have one master workbook that has sheets that are linked to 9 other
workbooks. The other 9 workbooks have individual passwords. When I open the
"master" workbook, I have to enter the other 9 workbook passwords. How do I
get around that? Anybody?
--
M.Stanley


--

Dave Peterson
Reply
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
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
insert password protected spreadsheet RZT27Y Excel Discussion (Misc queries) 1 September 30th 05 10:57 PM
Multiple workbook user's with Master workbook - all password protected Yvon Excel Discussion (Misc queries) 2 March 30th 05 01:34 PM
Linking to a Password Protected Document in Excel 2000 Andrew Excel Discussion (Misc queries) 2 February 15th 05 01:06 AM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM


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