Hello. I have created to code below which is basically meant to create a separate workbook from the contents of the current worksheet the code is on, and save it to the specified directory using the date in cell B3 as part of the file name and as a .xlsx (don't want it to be a macro-enabled workbook for some other reasons). However, I keep getting "Run-time '70': Permission denied" and not sure what I am doing wrong. This is my home PC and I have all permissions on it. Thanks
VBA Code:
Private Sub SaveVS_Click()
ActiveSheet.Unprotect Password:="mypassword"
ActiveSheet.Copy ' creates new workbook
ActiveSheet.Range("A6:L29").Interior.ColorIndex = 19
Date = ActiveSheet.Range("B3")
ActiveSheet.Protect Password:="mypassword1"
strFileName = "C:\Users\Kaye\Desktop\"
ActiveWorkbook.SaveAs Filename:=Path & Date & "\Variation Sheets.xlsx"
End Sub