Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
ActiveSheet.Pictures.Delete
I need to modify the above so that it does not include all the commandbuttons, but how? I need commandbuttons and not a forms - button as the code needs to be exportable to other files and to take the code with them. Any ideas? Corey.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
Hi Corey,
Try: '============= Public Sub Tester() Dim SHP As Shape For Each SHP In ActiveSheet.Shapes With SHP If .Type = msoPicture Then .Delete End If End With Next SHP End Sub '<<============= --- Regards, Norman "Corey" wrote in message ... ActiveSheet.Pictures.Delete I need to modify the above so that it does not include all the commandbuttons, but how? I need commandbuttons and not a forms - button as the code needs to be exportable to other files and to take the code with them. Any ideas? Corey.... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
thanks Norman.
Perfect "Norman Jones" wrote in message ... Hi Corey, Try: '============= Public Sub Tester() Dim SHP As Shape For Each SHP In ActiveSheet.Shapes With SHP If .Type = msoPicture Then .Delete End If End With Next SHP End Sub '<<============= --- Regards, Norman "Corey" wrote in message ... ActiveSheet.Pictures.Delete I need to modify the above so that it does not include all the commandbuttons, but how? I need commandbuttons and not a forms - button as the code needs to be exportable to other files and to take the code with them. Any ideas? Corey.... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
Hi Corey,
Additionally, see Ron de Bruin's discussion at: http://www.rondebruin.nl/controlsobjectsworksheet.htm See particularly the section entitled: 'Delete only specific shapes' --- Regards, Norman |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
Dim SHP As Shape
For Each SHP In ActiveSheet.Shapes <======== How can i change this to ALL Sheets in workbook ? With SHP If .Type = msoPicture Then .Delete End If End With Next SHP Corey.... "Norman Jones" wrote in message ... Hi Corey, Additionally, see Ron de Bruin's discussion at: http://www.rondebruin.nl/controlsobjectsworksheet.htm See particularly the section entitled: 'Delete only specific shapes' --- Regards, Norman |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to stop CommandButtons being deleted as pictures in code??
Hi Corey,
Try: '============= Public Sub Tester() Dim SH As Worksheet Dim SHP As Shape For Each SH In ThisWorkbook.Worksheets For Each SHP In SH.Shapes With SHP If .Type = msoPicture Then .Delete End If End With Next SHP Next SH End Sub '<<============= --- Regards, Norman "Corey" wrote in message ... Dim SHP As Shape For Each SHP In ActiveSheet.Shapes <======== How can i change this to ALL Sheets in workbook ? With SHP If .Type = msoPicture Then .Delete End If End With Next SHP Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to lock pictures from moving or being deleted in excel 2007 | Excel Discussion (Misc queries) | |||
Stop rows from being deleted whilst allowing cells contents to cha | Excel Discussion (Misc queries) | |||
Pictures.Visible question (after adding many pictures, they stop disappearing) | Excel Programming | |||
VB Code to stop cells being deleted | Excel Programming | |||
Stop Excel Updating formulas when cells are deleted? | Excel Programming |