Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I have a number of worksheets that I copy to a new workbook. These worksheets have a number of command buttons. I would like to remove these buttons after copying. Is this possible with VBA? Thanks. Albert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this Albert:
'==================== Sub DeleteAllButtons() Dim mySheet As Worksheet Dim MyButton As OLEObject For Each mySheet In ActiveWorkbook.Worksheets For Each MyButton In mySheet.OLEObjects If TypeOf MyButton.Object Is MSForms.CommandButton Then MyButton.Delete End If Next MyButton Next mySheet End Sub '==================== On 11 Sep, 12:20, "Albert Browne" wrote: Hi. I have a number of worksheets that I copy to a new workbook. These worksheets have a number of command buttons. I would like to remove these buttons after copying. Is this possible with VBA? Thanks. Albert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove macro programmatically | Excel Programming | |||
Remove missing reference programmatically | Excel Programming | |||
How to programmatically remove an AddIn (xla) | Excel Programming | |||
Programmatically remove sharing? | Excel Programming | |||
Programmatically adding buttons to a worksheet (Shape Object) | Excel Programming |