Bonjour, et merci pour ta réponse.
JpPradier a écrit :
- If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ...
Je rappelle: je suis novice. Ai-je bien compris ?
Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5"
et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui
précède, sinon Then... suite de la Sub.
Mais alors pourquoi ne pas faire :
- If Intersect(Range("B5:M5"), Target) Then ...
Je ne vois pas la différence.
Excuse-moi d'être "collant" !
Merci encore. Michel PICHOU
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
anonymousA
regarde l'exemple suivant tiré de l'aide d'Excel: l
Worksheets("Sheet1").Activate Set isect = Application.Intersect(Range("rg1"), Range("rg2")) If isect Is Nothing Then MsgBox "Ranges do not intersect" Else isect.Select End If
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
regarde l'exemple suivant tiré de l'aide d'Excel: l
Worksheets("Sheet1").Activate
Set isect = Application.Intersect(Range("rg1"), Range("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If
Bonjour, et merci pour ta réponse.
- If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ...
Je rappelle: je suis novice. Ai-je bien compris ?
Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5"
et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui
précède, sinon Then... suite de la Sub.
Mais alors pourquoi ne pas faire :
- If Intersect(Range("B5:M5"), Target) Then ...
Je ne vois pas la différence.
Excuse-moi d'être "collant" !
Merci encore. Michel PICHOU
regarde l'exemple suivant tiré de l'aide d'Excel: l
Worksheets("Sheet1").Activate Set isect = Application.Intersect(Range("rg1"), Range("rg2")) If isect Is Nothing Then MsgBox "Ranges do not intersect" Else isect.Select End If
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
Frédéric Sigonneau
Bonjour,
Je ne vois pas le début de cette conversation, mais cette ligne de code : If Not Intersect(Range("B5:M5"), Target) Is Nothing Then signifie Si l'intersection entre la plage B5:M5 et la cellule cible (Target) n'est pas rien Alors ou, en français, Si la cellule cible appartient à la plage B5:M5 alors etc.
FS --- Frédéric Sigonneau [MVP Excel - né un sans-culottide] Gestions de temps, VBA pour Excel : http://frederic.sigonneau.free.fr Si votre question sur Excel est urgente, évitez ma bal !
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
Bonjour,
Je ne vois pas le début de cette conversation, mais cette ligne de code :
If Not Intersect(Range("B5:M5"), Target) Is Nothing Then
signifie
Si l'intersection entre la plage B5:M5 et la cellule cible (Target) n'est pas
rien Alors
ou, en français,
Si la cellule cible appartient à la plage B5:M5 alors etc.
FS
---
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://frederic.sigonneau.free.fr
Si votre question sur Excel est urgente, évitez ma bal !
Bonjour, et merci pour ta réponse.
- If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ...
Je rappelle: je suis novice. Ai-je bien compris ?
Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5"
et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui
précède, sinon Then... suite de la Sub.
Mais alors pourquoi ne pas faire :
- If Intersect(Range("B5:M5"), Target) Then ...
Je ne vois pas la différence.
Excuse-moi d'être "collant" !
Merci encore. Michel PICHOU
Je ne vois pas le début de cette conversation, mais cette ligne de code : If Not Intersect(Range("B5:M5"), Target) Is Nothing Then signifie Si l'intersection entre la plage B5:M5 et la cellule cible (Target) n'est pas rien Alors ou, en français, Si la cellule cible appartient à la plage B5:M5 alors etc.
FS --- Frédéric Sigonneau [MVP Excel - né un sans-culottide] Gestions de temps, VBA pour Excel : http://frederic.sigonneau.free.fr Si votre question sur Excel est urgente, évitez ma bal !
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
isabelle
bonjour Michel,
Not Intersect(a, b) Is Nothing appartient à l'intersection
Intersect(a, b) Is Nothing n'appartient pas à l'intersection
isabelle
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
bonjour Michel,
Not Intersect(a, b) Is Nothing
appartient à l'intersection
Intersect(a, b) Is Nothing
n'appartient pas à l'intersection
isabelle
Bonjour, et merci pour ta réponse.
- If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ...
Je rappelle: je suis novice. Ai-je bien compris ?
Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5"
et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui
précède, sinon Then... suite de la Sub.
Mais alors pourquoi ne pas faire :
- If Intersect(Range("B5:M5"), Target) Then ...
Je ne vois pas la différence.
Excuse-moi d'être "collant" !
Merci encore. Michel PICHOU
Not Intersect(a, b) Is Nothing appartient à l'intersection
Intersect(a, b) Is Nothing n'appartient pas à l'intersection
isabelle
Bonjour, et merci pour ta réponse. - If Not Intersect(Range("B5:M5"), Target) Is Nothing Then ... Je rappelle: je suis novice. Ai-je bien compris ? Cette instruction signifie : S'il n'y a pas intersection entre "B5:M5" et Target, alors l'instruction signifie d'oublier (Is Nothing) ce qui précède, sinon Then... suite de la Sub. Mais alors pourquoi ne pas faire : - If Intersect(Range("B5:M5"), Target) Then ... Je ne vois pas la différence. Excuse-moi d'être "collant" ! Merci encore. Michel PICHOU
JpPradier
Bonsoir Michel
J'aurais du servir dans les carabiniers, moi : j'arrive après la bataille ! :-) Je crois que je n'ai rien à ajouter aux réponses données.
j-p
Bonsoir Michel
J'aurais du servir dans les carabiniers, moi : j'arrive après la bataille !
:-)
Je crois que je n'ai rien à ajouter aux réponses données.