Macro to copy a sheet and delete a macro button
Hi,
I'm not sure under which circumstances the button would actually be copied.
try this
Sub Button1_Click()
Dim WB As Workbook
ActiveWorkbook.Sheets("Sheet1").UsedRange.Copy
Set WB = Workbooks.Add
WB.Sheets(1).Range("A1").PasteSpecial
End Sub
Mike
"JoeP" wrote:
In Excel 2003 I have a worksheet that has a macro button on it. I would like
a macro that will do two things.
1. Make a copy of the sheet into a new workbook.
2. Delete the macro button on the newly created worksheet in the new book
and keep the macro button on the original worksheet.
Any help would be appreciated. Thanks.
JoeP
|