Option Explicit
Sub testme()
Dim myFileNames As Variant
Dim myPasswords As Variant
Dim iCtr As Long
Dim wkbk As Workbook
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
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
Next iCtr
End Sub
> the individual isn't very knowledgeable on excel so I would be worried
> about them accessing the macro. Do you have an example?
[quoted text clipped - 4 lines]
> DKerr's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=13087
> View this thread: http://www.excelforum.com/showthread.php?threadid=550927

Signature
Dave Peterson