Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe you could have another workbook contains a macro that opens the other 20
workbooks. The macro would need to know all the names and passwords for the files. This expects a worksheet named WkbkList that contains the names of the files in A2:Axxx (headers in row 1) and passwords in B2:Bxxx. (The filenames have to include the drive, path and name.) 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 'the workbook with all the links myRealWkbkName = "C:\my documents\excel\book1.xls" With Worksheets("WkbkList") myFileNames = .Range("a2:b" & _ .Cells(.Rows.Count, "A").End(xlUp).Row).Value End With Set myRealWkbk = Workbooks.Open(Filename:=myRealWkbkName, UpdateLinks:=0) For iCtr = LBound(myFileNames, 1) To UBound(myFileNames, 1) Set wkbk = Nothing On Error Resume Next Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr, 1), _ Password:=myFileNames(iCtr, 2), _ ReadOnly:=True) On Error GoTo 0 If wkbk Is Nothing Then MsgBox "Check file: " & myFileNames(iCtr, 1) Else 'the links should have updated when 'this workbook was opened. 'so we can close it here wkbk.Close savechanges:=False End If Next iCtr End Sub If the files are all in the same folder, you don't have to include that in the worksheet cells. You could just tell the program where to look: Change this line: Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr, 1), _ Password:=myFileNames(iCtr, 2), _ ReadOnly:=True) to: Set wkbk = Workbooks.Open(Filename:="C:\myfoldernamehere\" & _ myFileNames(iCtr, 1), _ Password:=myFileNames(iCtr, 2), _ ReadOnly:=True) tmax wrote: I have approximately 40 Excel Files all to be updated by individual Users, all password protected and accessible only to one user each. I also have a "summary" workbook to be reviewed on a daily basis. it is a big inconvenience to have to know and type 40 different user passwords on a daily basis to have all links updated. Is there any way arround that? Thank you. -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
use source formatting with protected worksheet | Excel Worksheet Functions | |||
Update source link in MANY files | Excel Worksheet Functions | |||
Linking to Protected Source File on Shared Server | Setting up and Configuration of Excel | |||
Change Source of Link in Protected Sheet | Excel Discussion (Misc queries) | |||
Password protected files | Excel Discussion (Misc queries) |