Hi
I have this vba code below which is meant to extract a work sheet from a file , paste special the values as they have links and formulas and save it in a path provided with a specific name .
The macro works fine . However I need to protect certain cells as they have formulaes and the user at times inadvertently tend to delete them .
Can someone please help me show a way in which I can run the macro even though cells are protected.
Here is the code below
Sub SaveSheetToFile()
Application.DisplayAlerts = False
myPath = "I:\Quotation copies\"
Ord_Nm = Worksheets("Quotation").Range("E14")
Filename = "Quotation - " & Format(Date, "dd-mm-yy") & " " & Ord_Nm
Sheets("Quotation").Copy
ActiveWorkbook.SaveAs Filename:=myPath & Filename & ".xlsx", CreateBackup:=False
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Close True
End Sub
Bookmarks