Hello,

I have the following code:

Sub Button1_Click()
Range("E1:E12").Value = "='C:\Users\zzz\Desktop\New folder\[source.xlsx]Sheet1'!D1:D12"
Sheets("Sheet1").Range("H1").Value = Format(Now, "dd-mmm-yy hh-mm-ss")
End Sub

it copies cells D1:D12 into from source.xlsx file into E1:E12 cells in my main file and puts a time stamp in cell H1.

Does anyone know how the code should look like if the source.xslx is password protected???

Many thanks in advance.