Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Hidden Macro

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Hidden Macro

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
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Hidden Macro

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
|
|



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
||
||
|
|
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden Macro Shu of AZ Excel Discussion (Misc queries) 2 February 26th 07 10:39 PM
hidden macro? [email protected] Excel Discussion (Misc queries) 2 January 2nd 07 08:09 PM
Hidden Macro Remington Excel Discussion (Misc queries) 2 June 9th 06 09:47 PM
Redundant Macro warning or hidden macro? MattF Excel Programming 1 January 14th 04 12:14 PM
Hidden macro Don[_14_] Excel Programming 3 December 1st 03 07:22 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"