I would expect the statement below…
“wb.SaveAs PthAndName, FileFormat:=51, CreateBackup:=False”
to create a file that would be in the “.xlsx” format that is NOT macro-enabled. But is still saves as Macro-enabled even though the file extension is “.xlsx”. This could be because there is a data Link reference that still exists when the file is saved.
Is there a way to save this file so that the links are broken?
PthAndName = ActiveWorkbook.Path & "\" & ActiveSheet.Name
MsgBox "The file willbe saved as: " & PthAndName & ".xlsx"
' vLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
Set wb = ActiveWorkbook
wb.SaveAs PthAndName, FileFormat:=51, CreateBackup:=False
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.ScreenUpdating = True
Set wb = Nothing