Excel - Macro to delete any control box and pictures

Asked By Steve
09-Feb-10 03:10 PM
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 was not found)

I assume by downloading various data, the numbers of the objects change, and
that is probably why it is 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
Microsoft Excel
(1)
Shapes
(1)
ActiveSheet.Shapes
(1)
Macro
(1)
OKEdit
(1)
AllMay
(1)
  Gord Dibben replied to Steve
09-Feb-10 03:29 PM
Have you tried F5>Special>Objects>OK

Edit>Clear>All

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


Gord Dibben  MS Excel MVP
  Steve replied to Gord Dibben
09-Feb-10 04:46 PM
Thank you, but like you said, it is 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 ?
Create New Account
help
Win7 VirtualStore Weirdness with Excel 2002 and earlier Excel I thought I'd share a weird experience I had today in case it saves installer for it - - which registers it as an add-in for all installed versions of Excel - - and tested it. Fine in Windows 2000 in all installed versions of Excel. Boot to Windows XP, fine there too. Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002 and 2000 were still loading the old version of the add-in. I uninstalled the add-in, made sure it was gone, and reinstalled it. Same problem in Excel 2002 and earlier; still works fine in Excel 2003 and later. I opened the VB editor in Excel 2003 and in Excel 2002
Pb de recalcul Excel Bonjour, J'ai un problème de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF cela soit automatique ? Merci d'avance à ceux qui se pencheront sur mon cas. Caroual Excel - French Discussions WorksheetFunction (1) AddIns (1) Worksheets (1) Excel 2007 (1) Macro (1) Proc (1) LEFT (1) VBA (1) Bonsoir Dans la doc sur HEXBIN, ils ne Quant ? cette page, elle parle de non fonctionnement si VBA est d?sactiv? . . . . http: / / support.microsoft.com / kb / 282847 / fr#appliesto Par contre, ceci = HEX2BIN("B3") donne 10110011 Jacquouille 4f05e5b4$0 426a74cc@news.free.fr. . . Bonjour, J'ai un probl?me de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF et un texte" Next ce que tu peux d = E9clencher = E0 l'aide d'une macro qui se charge de l'imp = ort = 20 avant, de fa = E7on que les deux
Aggiornamento - Microsoft Risponde all’evoluzione delle Community Excel Cosa accade? Per informarvi che Microsoft comincerà presto a chiudere I newsgroup e a “transitare”, pian piano, se lo vorrete, il traffico sui Forum Microsoft. Perchè? Come ben sapete, i newsgroup sono esistiti per molti anni; il problema però è newsgroup. E’ possibile trovare informazioni su come installare e configurare il bridge qui: http: / / connect.microsoft.com / MicrosoftForums / Perchè i newsgroup verranno chiusi? Tutti i newsgroup pubblici verranno chiusi tra il la chiusura dei newsgroup, dove posso andare online per continuare le discussioni e ricevere supporto? Microsoft vi fornisce un’ampia scelta di forum, alcuni dei quali coprono lo stesso argomento od ottimale per continuare le discussioni online. Raccomandiamo quindi di cominciare con il http: / / social.answers.microsoft.com / Forums / it-IT / officeexcelit forum Vi invitiamo comunque a visitare i Forum Microsoft: http: / / www.microsoft.com / communities / forums / default.mspx Se ho domande, chi devo contattare? Se
Erinnerung - Microsoft reagiert auf Evolution der Community Excel Microsoft Office betrachtet Community als Teil des neuen Office 2010 Wie Sie wissen ist das Jahr 2010 ein wichtiges Jahr f?r Microsoft. Die neue Office-Version kommt auf den Markt. Office 2010 soll Ihnen das Leben und Hersteller beim Kauf eines neuen PCs erwerben. Ihre gew?nschte Version ist auch direkt von Microsoft erh?ltlich. Durch eine neue Methode zur Softwarebereitstellung mit dem Namen ?Click-To-Run? gelingt individuell! Worum geht es? Diese Nachricht dient dem Zweck, Sie dar?ber zu informieren, dass Microsoft demn?chst die Newsgroups abstellen und die Nutzer auf die Microsoft Foren verweisen wird. Warum? Wie Sie vielleicht wissen, gibt es Newsgroups schon seit einigen Jahren doch ist die Nutzung der Microsoft Newsgroups seit Jahren stetig zur?ckgegangen, da Kunden und Teilnehmer vermehrt L?sungen in den
problème_vba_excel_2010 Excel Bonsoir le groupe, J'utilise excel 2010 et depuis lors le code VBA ci-apr = E8s ne fonctionne pas. Pourriez-vous ou chemin en dur ActiveSheet.Copy ActiveWorkbook.SaveAs Filename: = 3DCHEMIN_D_ACCES & _ FileFormat: = 3DxlOpenXMLWorkbookMacroEnabled, CreateBackup: = 3DFalse ActiveSheet.Shapes("CommandButton1").Select Selection.Delete ActiveSheet.Shapes("CommandButton2").Select Selection.Delete ActiveSheet.Shapes("CommandButton3").Select Selection.Delete ActiveSheet.Shapes("CommandButton4").Select Selection.Delete ActiveSheet.Shapes("CommandButton5").Select Selection