Dim bk as Workbook, sPath as String
Dim sStr as String
sPath = "C:\MyFolder\"
sStr = Dir(sPath & "*.xls")
do while sStr < ""
set bk = workbooks.Open( filename:=sStr, _
password:="ABCD")
' work with bk
bk.close Savechanges:=False
sStr = Dir()
Loop
--
Regards,
Tom Ogilvy
"guilhaume " wrote in message
...
Hi all,
I'm trying to get data from hundred of excel files with Java.
The workbooks are locked (so I cannot get the data, and there is no
Java-solution), I know the password, but I don't want to unlock them
manually :)
Does anybody know a script (I don't know vb very well...) that can do
this job for me?
reguards
---
Message posted from http://www.ExcelForum.com/