opening a password protected file with a password and choosing no to read only

rholdren

Board Regular
Joined
Aug 25, 2016
Messages
140
Office Version
  1. 365
  2. 2019
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
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top