Hidden Macro
Maybe...
Sub a()
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
If sh.Name < "Picture 1" Then ''chg to your object's name
sh.Delete
End If
Next
End Sub
--
Jim Rech
Excel MVP
"Scott" wrote in message
...
| Thanks very much,
|
| I have managed to delete all the object on the sheet using the following
| code;
|
| For Each sh In ActiveSheet.Shapes
| sh.Delete
| Next
|
| But I have just one problem, there's one object that needs to stay on the
| sheet, a picture (Labelled - My Logo). Is there any way I can delete all
the
| objects except the My Logo picture?
|
| Hope someone can help,
| Thanks
| Best regards,
| Scott
|
|
|
|
| "Jim Rech" wrote in message
| ...
| To remove all objects on your worksheets (it sounds as if you have at
least
| one object):
|
| -select disable macros when you open the workbook. Then on each worksheet
| do a F5, Special and select "Objects" and OK. If there are objects they
| will be selected and you can just press Delete to remove them.
|
| To remove all macros you have to open the VBE (press Ctrl-F11) and
| -Delete any regular Modules listed in the Project Explorer window.
| -Go to the ThisWorkbook module and each Sheet module and clear out _all_
| code. (You cannot delete these special modules so all you can do is remove
| any code they have).
|
| --
| Jim Rech
| Excel MVP
|
| "Scott" wrote in message
| ...
|| Hi,
||
|| Can someone please help me,
||
|| I have a workbook that has been copied from a large workbook to a new
|| workbook, using a macro, and removing all buttons. But when I save the
new
|| workbook and then re-open it, a macro seems to have stayed on the
| workbook,
|| but I cannot find it anywhere. I've looked under the macro section in
| Tools
|| and no macro are listed.
|| I have managed to find something odd on the worksheet. If I select
disable
|| the macro when the opening, a button appears at the top of the sheet.
This
|| button is greyed out, but if I click on the button there is a formula or
|| code attached to it, that shows up in the Formula Bar,
|| (=EMBED("Forms.CommandButton.1",""))
||
|| Does anyone know what this is and how I can delete it using a macro?
||
|| Hope someone can help,
|| Thanks
|| Best regards,
|| Scott
||
||
|
|
|
|