I've seen a couple of things close to this but this is a little odd. I have a password protected file "Mater File Links"
Its protected from the general public (of this office)
The way the data is entered is through another Workbook. Before I was forced to protect the "Master File Links" the Open workbook had a macro that would open the Master File Links file and paste a selected range of copied data.
Is it possible that I can add some VB to the Sub to enter the password and to chosse "No" for openeing as read only?
This is the current procedure
Sub Transfer_Data()
Sheets("Postings").Select
Range("A7.AK50").Select
Selection.Copy
Workbooks.Open Filename:= _
"X:\Columbus\Audit Tracking\Master File\2019\Base\BaseMasterFile.xlsx"
Sheets("Base2019").Select
Range("a3:a75000").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.PasteSpecial Paste:=xlPasteValues
ActiveCell.PasteSpecial Paste:=xlPasteFormats
ActiveWorkbook.Save
ActiveWindow.Close
Sheets("Postings").Select
Selection.Delete
' Sheets("Template").selct
'ActiveWorkbook.Save
'ActiveWindow.Close
Call DeleteSheets
ActiveWorkbook.Save
End Sub
Thanks
Its protected from the general public (of this office)
The way the data is entered is through another Workbook. Before I was forced to protect the "Master File Links" the Open workbook had a macro that would open the Master File Links file and paste a selected range of copied data.
Is it possible that I can add some VB to the Sub to enter the password and to chosse "No" for openeing as read only?
This is the current procedure
Sub Transfer_Data()
Sheets("Postings").Select
Range("A7.AK50").Select
Selection.Copy
Workbooks.Open Filename:= _
"X:\Columbus\Audit Tracking\Master File\2019\Base\BaseMasterFile.xlsx"
Sheets("Base2019").Select
Range("a3:a75000").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.PasteSpecial Paste:=xlPasteValues
ActiveCell.PasteSpecial Paste:=xlPasteFormats
ActiveWorkbook.Save
ActiveWindow.Close
Sheets("Postings").Select
Selection.Delete
' Sheets("Template").selct
'ActiveWorkbook.Save
'ActiveWindow.Close
Call DeleteSheets
ActiveWorkbook.Save
End Sub
Thanks