mrnacar
Board Regular
- Joined
- Jan 27, 2010
- Messages
- 193
- Office Version
- 365
- Platform
- Windows
Why am I getting the following error message after running my macro. Is there anything wrong with my macro? It seems my macro runs completely, but once it's done, I get the following error which is annoying.
VBA Code:
Sub Auto_Open()
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
Dim year4 As String
Dim year2 As String
year4 = Range("B2").Value
year2 = Range("B3").Value
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Workbooks.Open Filename:="\\pfcoffice3\" & year4 & " Reports\PFC\COLREC" & year2 & "\Recovery\SCC_Vendor_Template.xlsx"
Application.Run "ssgenallquerydetail"
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.ScreenUpdating = True
Application.DisplayAlerts = False
ThisWorkbook.Saved = True
Application.Quit
End Sub