Please use Code tags rather than VBA now.
Obviously, you need to add the password option parameter values. Try the refresh parameter as true as well.
Sub ken() Dim wb As Workbook Set wb = Workbooks.Open("x:\t\book2.xlsx", True, , , "ken", "ken") wb.Close True End Sub