hi
Can anyone help me to transfer data from a password protected workbook to another?
This code is working the problem is even if the password in wba, the excel always asks when I open the workbook.
So I cancel and then I have to runsub manual to get what I want.
Thanks in advance
Nick
Sub frompassword()
Dim src As Workbook
Set src = Workbooks.Open("C:\Users\fleem\Desktop\001.xlsx", False, True, Password:="12125656")
ThisWorkbook.Activate
Worksheets("sheet1").Range("B2:D3").Formula = src.Worksheets("sheet1").Range("A1:E10").Formula
End Sub
Can anyone help me to transfer data from a password protected workbook to another?
This code is working the problem is even if the password in wba, the excel always asks when I open the workbook.
So I cancel and then I have to runsub manual to get what I want.
Thanks in advance
Nick
Sub frompassword()
Dim src As Workbook
Set src = Workbooks.Open("C:\Users\fleem\Desktop\001.xlsx", False, True, Password:="12125656")
ThisWorkbook.Activate
Worksheets("sheet1").Range("B2:D3").Formula = src.Worksheets("sheet1").Range("A1:E10").Formula
End Sub