Chris Williamson
Board Regular
- Joined
- Oct 16, 2010
- Messages
- 83
Hi,
This very simple little code opens a new workbook.
But if I add a password to the file that I'm going to open the password box appears.
What do I need to add to this code to automatically input this password?
I have tried putting this at the end:
but this does not work?
Thanks
Code:
Sub Open_Test_File()
Dim wb As Workbook
Set wb = Application.Workbooks.Open("Desktop\Test File.xls")
End Sub
This very simple little code opens a new workbook.
But if I add a password to the file that I'm going to open the password box appears.
What do I need to add to this code to automatically input this password?
I have tried putting this at the end:
Code:
Password:="123"
Thanks