I have the following code in a macro
Workbooks.OpenText Filename:=Application.GetOpenFilename
Columns("A:D").Select
Selection.Delete Shift:=xlToLeft
Columns("B:AF").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Range("A1:A50000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"B1"), Unique:=True
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select
Selection.Delete Shift:=xlUp
ActiveWorkbook.SaveAs
ActiveWorkbook.Close
Application.Quit
after executing the macro excel asks to save the file. Is there any way to automate this so that excel will answer yes to the save as question.
Thanks
Rodney
Workbooks.OpenText Filename:=Application.GetOpenFilename
Columns("A:D").Select
Selection.Delete Shift:=xlToLeft
Columns("B:AF").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Range("A1:A50000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"B1"), Unique:=True
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select
Selection.Delete Shift:=xlUp
ActiveWorkbook.SaveAs
ActiveWorkbook.Close
Application.Quit
after executing the macro excel asks to save the file. Is there any way to automate this so that excel will answer yes to the save as question.
Thanks
Rodney