Dim File_name As Variant
Application.ScreenUpdating = False
Application.DisplayAlerts = False
With Sheets("výdejka")
.Cells.Copy
End With
Workbooks.Add
ActiveSheet.Paste
ActiveWindow.DisplayGridlines = False
Application.CutCopyMode = False
ActiveSheet.Name = "výdejka"
Sheets("list2").Delete
Sheets("list3").Delete
Range("A1").Select
Application.DisplayAlerts = True
File_name = Application.GetSaveAsFilename(FileFilter:="Excel 2003,*.xls,Excel 2007,*.xlsx,All Files,*.*", Title:="Save As File Name")
If File_name = False Then Exit Sub
ActiveWorkbook.SaveAs File_name
Application.ScreenUpdating = True
ActiveWorkbook.Close savechanges:=False
End Subcitovat