Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Macro to delete any control box and pictures

I recorded this macro:

ActiveSheet.Shapes("Control 3").Select
Selection.Cut
ActiveSheet.Shapes("Picture 1").Select
Selection.Cut
ActiveSheet.Shapes("Picture 2").Select
Selection.Cut

but it hang's (item with the spcified name wasn't found)

I assume by downloading various data, the numbers of the objects change, and
that's probably why it's hanging. Different data but all with the same
control box and pictures.
Is there a way to run a macro that will delete the control box and pictures.
Perhaps writing it as :
Cut any control, any picture, any button ?

Thanks,

Steve


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Macro to delete any control box and pictures

Have you tried F5SpecialObjectsOK

EditClearAll

May be too destructive if you have other objects you want to keep.


Gord Dibben MS Excel MVP


On Tue, 9 Feb 2010 12:10:01 -0800, Steve
wrote:

I recorded this macro:

ActiveSheet.Shapes("Control 3").Select
Selection.Cut
ActiveSheet.Shapes("Picture 1").Select
Selection.Cut
ActiveSheet.Shapes("Picture 2").Select
Selection.Cut

but it hang's (item with the spcified name wasn't found)

I assume by downloading various data, the numbers of the objects change, and
that's probably why it's hanging. Different data but all with the same
control box and pictures.
Is there a way to run a macro that will delete the control box and pictures.
Perhaps writing it as :
Cut any control, any picture, any button ?

Thanks,

Steve


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Macro to delete any control box and pictures

Thank you, but like you said, it's a bit too destructive, as I have a macro
button that it also gets cut.
Any thoughts on how to cut all but the macro button ?



"Gord Dibben" wrote:

Have you tried F5SpecialObjectsOK

EditClearAll

May be too destructive if you have other objects you want to keep.


Gord Dibben MS Excel MVP


On Tue, 9 Feb 2010 12:10:01 -0800, Steve
wrote:

I recorded this macro:

ActiveSheet.Shapes("Control 3").Select
Selection.Cut
ActiveSheet.Shapes("Picture 1").Select
Selection.Cut
ActiveSheet.Shapes("Picture 2").Select
Selection.Cut

but it hang's (item with the spcified name wasn't found)

I assume by downloading various data, the numbers of the objects change, and
that's probably why it's hanging. Different data but all with the same
control box and pictures.
Is there a way to run a macro that will delete the control box and pictures.
Perhaps writing it as :
Cut any control, any picture, any button ?

Thanks,

Steve


.

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
Delete Multiple Pictures Supe Excel Discussion (Misc queries) 3 April 9th 07 07:00 PM
Macro to delete various pictures and hyper-link picture icons Steve Excel Worksheet Functions 13 December 5th 06 09:39 PM
Delete pictures in spreadsheet seedman Excel Discussion (Misc queries) 4 July 30th 06 04:21 PM
delete pictures with a macro Noel Rietman Excel Discussion (Misc queries) 1 March 20th 06 04:43 PM
Macro to delete pictures ? Steve Excel Worksheet Functions 8 October 18th 05 10:09 PM


All times are GMT +1. The time now is 02:06 PM.

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"