[excel][vba] selection zone de texte
Fermé
bunta
Messages postés
13
Date d'inscription
mercredi 6 décembre 2006
Statut
Membre
Dernière intervention
8 avril 2009
-
11 janv. 2007 à 16:00
sandraros - 1 déc. 2007 à 20:59
sandraros - 1 déc. 2007 à 20:59
A voir également:
- [excel][vba] selection zone de texte
- Zone telechargement - Accueil - Outils
- Excel cellule couleur si condition texte - Guide
- Liste déroulante excel - Guide
- Si et excel - Guide
- Aller à la ligne excel - Guide
5 réponses
pardon, le code ci-dessus supprime toutes les shapes du chart. Ce script ci-après ne supprime que ceux dont les noms commencent par Text Box:
Sub delete_textbox()
Dim oneshape As Shape
For Each oneshape In ActiveSheet.Shapes
If Left(oneshape.Name, 8) = "Text Box" Then
oneshape.Select
Selection.Delete
End If
Next
End Sub
Sub delete_textbox()
Dim oneshape As Shape
For Each oneshape In ActiveSheet.Shapes
If Left(oneshape.Name, 8) = "Text Box" Then
oneshape.Select
Selection.Delete
End If
Next
End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
pardon, le code ci-dessus supprime toutes les shapes du chart. Ce script ci-après ne supprime que ceux dont les noms commencent par Text Box:
<font face=Courier New><br><SPAN style="color:#00007F">Sub</SPAN> delete_textbox()<br><br><SPAN style="color:#00007F">Dim</SPAN> oneshape <SPAN style="color:#00007F">As</SPAN> Shape<br><SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> oneshape <SPAN style="color:#00007F">In</SPAN> ActiveSheet.Shapes<br> <SPAN style="color:#00007F">If</SPAN> Left(oneshape.Name, 8) = "Text Box" <SPAN style="color:#00007F">Then</SPAN><br> oneshape.Select<br> Selection.Delete<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">Next</SPAN><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
<font face=Courier New><br><SPAN style="color:#00007F">Sub</SPAN> delete_textbox()<br><br><SPAN style="color:#00007F">Dim</SPAN> oneshape <SPAN style="color:#00007F">As</SPAN> Shape<br><SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> oneshape <SPAN style="color:#00007F">In</SPAN> ActiveSheet.Shapes<br> <SPAN style="color:#00007F">If</SPAN> Left(oneshape.Name, 8) = "Text Box" <SPAN style="color:#00007F">Then</SPAN><br> oneshape.Select<br> Selection.Delete<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">Next</SPAN><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>