Robert_Conklin
Board Regular
- Joined
- Jun 19, 2017
- Messages
- 173
- Office Version
- 365
- Platform
- Windows
- MacOS
Currently I have a workbook that my end users fill out and submit to make changes to spare part info. When I receive the workbook I transfer the data to a repository file that is used as a search tool. Currently the repository file can be accessed by my end users, but some of them make changes to the repository and make it impossible for the other end users to use it. Because of this, I would like to protect the repository file. I would like to modify my transfer code so that the protection will be removed from the "Master Parts Repository 2018" workbook so that my transfer can occur, but then restore the protection and save the file. Any help would be greatly appreciated. Below is my transfer code.
Code:
Sub DataTrAll_REP()Application.ScreenUpdating = False
fpath = "C:\Users\Robert.Conklin\OneDrive - Flowers
fname = "MASTER PARTS REPOSITORY 2018.xlsx"
Set dWB = Workbooks.Open(fpath & "\" & fname)
Call DataTrAEtoAE_REP
Call DataTrAUtoAU_REP
Call DataTrBLtoBL_REP
Call DataTrDCtoDC_REP
Call DataTrIOtoIO_REP
Call DataTrMMtoMM_REP
Call DataTrMTtoMT_REP
Call DataTrNDtoND_REP
dWB.Sheets("ADD-EXTEND").Activate
Cells.AutoFilter
Application.ScreenUpdating = True
End Sub