View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Macro to copy a sheet and delete a macro button

Basic code looks like this

Sub test()
Dim sh As Worksheet

ActiveSheet.Copy
Set sh = ActiveSheet

On Error Resume Next
sh.DrawingObjects.Visible = True
sh.DrawingObjects.Delete
On Error GoTo 0
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"JoeP" wrote in message ...
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