I have 35 workbooks, all with a different password.
I have started writing vba along the lines of:
..but it would get rather long winded to do all 35 like this.
I don't know much about arrays, but have the idea in my head that if I set up a loop of some sort to reference the file name and password each time (all files are in the same folder) it would make my life a lot easier.
Could anyone help? Thank you!
I have started writing vba along the lines of:
Code:
Workbooks.Open FileName:= _
"\\00 Quotes and orders 2005\Aberdeen.xls", Password:="password1", WriteResPassword:="password1"
Workbooks.Open FileName:= _
"\\00 Quotes and orders 2005\Birmingham.xls", Password:="password2", WriteResPassword:="password2"
..but it would get rather long winded to do all 35 like this.
I don't know much about arrays, but have the idea in my head that if I set up a loop of some sort to reference the file name and password each time (all files are in the same folder) it would make my life a lot easier.
Could anyone help? Thank you!