Tag: SaveAs filename

VBA Code To Create A New Excel File By Deleting The Existing File

Sub CreateFile ( ) If fso.FileExists(wbAddr + “Output.xls”) Then         Set wkOut = Workbooks.Open(wbAddr + “Output.xls”)         Set wkOut = Workbooks(“Output.xls”)         wkOut.Close         fso.DeleteFile wbAddr + “Output.xls” End If Set wkOut = Workbooks.Add wkOut.SaveAs filename:=wbAddr + “Output.xls” Set wkOut…