I have a macro that makes a copy of a sheet, changes the name of the workbook and closes. When it copies it includes the 4 command buttons that are on that sheet. How can I copy the sheet and note the command buttons? I have tried changing the properties to don't move, but to no avail they CB still copy.
Sub Auto_Close()
Sheets("LinenData").Select
Application.DisplayAlerts = False
myDateStamp = Format(Date, "yyyymmdd")
Filepath = ThisWorkbook.Path & "\Ordering Backup\" & _
myDateStamp & ".xls"
Sheets("LinenData").Activate
Sheets("LinenData").Copy
ActiveWorkbook.SaveAs Filename:=myDateStamp
If wsName <> "" Then
With ActiveSheet
.Name = myDateStamp
End With
End If
ActiveWorkbook.SaveAs Filename:=Filepath
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
Thanks for the help.
LeapingLizard
Bookmarks