James Lomas
New Member
- Joined
- Oct 4, 2018
- Messages
- 1
Good afternoon - new here so please be gentle as i'm a total novice at VBA coding...
I have a master spreadsheet that draws information from 3 password protected workbooks. In order to open then I have got the following code:
Sub OpenSesame()
Workbooks.Open Filename:="C:\folder\sub folder\file.xlsm", Password:="password"
Workbooks.Open Filename:="C:\folder\sub folder\file2.xlsm", Password:="password"
Workbooks.Open Filename:="C:\folder\sub folder\sub folder 2\file12.xlsm", Password:="password"
End Sub
Which is great - however it opens all three files - is there an additional code that will close the newly opening spreadsheets?!
Thanks
James
I have a master spreadsheet that draws information from 3 password protected workbooks. In order to open then I have got the following code:
Sub OpenSesame()
Workbooks.Open Filename:="C:\folder\sub folder\file.xlsm", Password:="password"
Workbooks.Open Filename:="C:\folder\sub folder\file2.xlsm", Password:="password"
Workbooks.Open Filename:="C:\folder\sub folder\sub folder 2\file12.xlsm", Password:="password"
End Sub
Which is great - however it opens all three files - is there an additional code that will close the newly opening spreadsheets?!
Thanks
James