We just upgraded from office 2013 to 2016
The Excel sheet I designed for our time sheets has been running this macro (shown below) that basically just saves the sheet under the operators name and puts in our accountants file.
however since the upgrade I now get "Compile error: Can't find project or library"
Now before we continue: yes I checked the references library to see if any boxes where not checked. everything looked similar.
So my question is twofold,
1. does anyone know a fix? or
2. Is there another way to work around the issue or rewrite it?
Sub SaveAs()
Dim FileName1 As String
Dim FileName2 As String
Dim Path As String
Application.DisplayAlerts = False
Path = "K:\VDC\VDC Time Sheets\2017 VDC Time Sheets\"
FileName1 = Range("V8")
FileName2 = Format(Range("V10"), "yyyy-mm-dd")
'.Value & ".xls"
ActiveWorkbook.SaveAs Path & FileName1 & "-" & FileName2, xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub