PC Review


Reply
Thread Tools Rate Thread

How do I link password protected files to a master spreadsheet?

 
 
=?Utf-8?B?TGF1cmllIE0u?=
Guest
Posts: n/a
 
      17th Jul 2006
I have a "master" file that several workbooks are linked to. Each individual
workbook is password protected. I would like to be able to open and update
the "master" file, however it is asking me for every individual password.
This will not work. Is there a way to "override" or to give a
"administrator" password so all the files update to the master without having
to type in each password?
Thank you.
Laurie
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      17th Jul 2006
How about just having another workbook that opens your workbook with the links
updated/not updated the way you want. Then the code continues to open the other
workbooks.

Saved from a previous post:

Option Explicit
Sub testme()

Dim myFileNames As Variant
Dim myPasswords As Variant
Dim iCtr As Long
Dim myRealWkbk As Workbook
Dim myRealWkbkName As String
Dim wkbk As Workbook

myRealWkbkName = "C:\my documents\excel\book1.xls"

myFileNames = Array("C:\my documents\excel\book11.xls", _
"C:\my documents\excel\book21.xls", _
"C:\my other folder\book11.xls")

myPasswords = Array("pwd1", _
"pwd2", _
"pwd3")

If UBound(myFileNames) <> UBound(myPasswords) Then
MsgBox "check names & passwords--qty mismatch!"
Exit Sub
End If

Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName, UpdateLinks:=0)

For iCtr = LBound(myFileNames) To UBound(myFileNames)
Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
Password:=myPasswords(iCtr))
On Error GoTo 0

If wkbk Is Nothing Then
MsgBox "Check file: " & myFileNames(iCtr)
Exit Sub
End If

wkbk.Close savechanges:=False
Next iCtr

End Sub

(I got bored after 3 workbooks. You may want to test it with a couple to get it
going.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Laurie M. wrote:
>
> I have a "master" file that several workbooks are linked to. Each individual
> workbook is password protected. I would like to be able to open and update
> the "master" file, however it is asking me for every individual password.
> This will not work. Is there a way to "override" or to give a
> "administrator" password so all the files update to the master without having
> to type in each password?
> Thank you.
> Laurie


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password protected spreadsheet BobW Microsoft Excel New Users 1 20th Nov 2009 02:25 PM
Opening a password-protected spreadsheet from a website link sgsolomon Microsoft Excel Misc 1 17th Aug 2008 08:16 AM
Link Password Protected Worksheets to Master PolQueen Microsoft Excel Worksheet Functions 2 6th Feb 2008 02:29 PM
How do I link from a master spreadsheet? =?Utf-8?B?dW9mdQ==?= Microsoft Excel Misc 2 15th Aug 2007 07:51 PM
How do I unlock a spreadsheet that is password protected? =?Utf-8?B?TW9rZQ==?= Microsoft Excel Worksheet Functions 4 26th Apr 2005 03:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 AM.