Hey,
Very new to VBA and I have a headache trying to figure this one out, which I'm hoping is actually easy (or can actually be done)
I'm splitting a workbook down and saving each sheet as a new workbook separately, which has worked fine. However I would like that each new workbook is protected when saved, so that they can only click in certain cells that I want them to. Can not figure it out for the life of me, so if someone is willing to help.. please save my sanity
Very new to VBA and I have a headache trying to figure this one out, which I'm hoping is actually easy (or can actually be done)
I'm splitting a workbook down and saving each sheet as a new workbook separately, which has worked fine. However I would like that each new workbook is protected when saved, so that they can only click in certain cells that I want them to. Can not figure it out for the life of me, so if someone is willing to help.. please save my sanity
VBA Code:
Sub copysheet()
Dim xWs As Worksheet
Dim xPath As String
xPath = Application.ActiveWorkbook.Path & "\Fee Earner Reports"
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
xWs.Copy
ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value
Application.ActiveWorkbook.SaveAs Filename:=xPath & " " & xWs.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Sheets("Instructions").Select
MsgBox ("Done.")
End Sub