lanzarotte
XLDnaute Nouveau
Bonjour,
J'aimerais tester l'existance d'une variable. Si celle-ci existe j'effectue mon code et si celle-ci n'existe pas je ne fais rien.
Entrement dit :
Si MaVariable existe alors
faire ...
Fin Si
Voici mon code, je veux tester l'existance d'une variable type Shape (Zone de Texte ) définie par son nom ActiveSheet.Shape("NomZoneTexte")
Sub MiseAJourCommentaire()
Dim numeroAction As Integer
Dim NomZoneTexte As String
For numeroAction = 3 To 18 Step 3
NomZoneTexte = "ztxt" & numeroAction
'''' ICI JE VOUDRAIS Faire Si ActiveSheet.Shapes(NomZoneTexte) existe _ alors faire '''''
ActiveSheet.Shapes(NomZoneTexte).Select
Selection.Characters.Text = FeuilCoeur.Cells(3, numeroAction)
'''''''''Fin Si'''''''''''''''''''''''''''''''''''''''''''
Next numeroAction
End Sub
Merci pour votre aide !
J'aimerais tester l'existance d'une variable. Si celle-ci existe j'effectue mon code et si celle-ci n'existe pas je ne fais rien.
Entrement dit :
Si MaVariable existe alors
faire ...
Fin Si
Voici mon code, je veux tester l'existance d'une variable type Shape (Zone de Texte ) définie par son nom ActiveSheet.Shape("NomZoneTexte")
Sub MiseAJourCommentaire()
Dim numeroAction As Integer
Dim NomZoneTexte As String
For numeroAction = 3 To 18 Step 3
NomZoneTexte = "ztxt" & numeroAction
'''' ICI JE VOUDRAIS Faire Si ActiveSheet.Shapes(NomZoneTexte) existe _ alors faire '''''
ActiveSheet.Shapes(NomZoneTexte).Select
Selection.Characters.Text = FeuilCoeur.Cells(3, numeroAction)
'''''''''Fin Si'''''''''''''''''''''''''''''''''''''''''''
Next numeroAction
End Sub
Merci pour votre aide !