Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Bonjour ! il te suffit d'inverser le next et le end if....
For each.... if then
end if Next
Voila...
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Bonjour !
il te suffit d'inverser le next et le end if....
For each....
if then
end if
Next
Voila...
"Pascal" <lapless@wanadoo.fr> a écrit dans le message de news:
460cc2d9$0$25913$ba4acef3@news.orange.fr...
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Bonjour ! il te suffit d'inverser le next et le end if....
For each.... if then
end if Next
Voila...
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Jacky
Bonjour,
Il y a plusieurs erreurs dans ce code 1- supprimer end if ( if condition then résultat est sur la même ligne , pas besoin de "end if") 2-[VacDéb] doit existé, à priori ce serait [A2:J32]. 3- If c* >= cel And c <= cel.Offset(0, 2) Then c*.Interior.ColorIndex = 34 *c= ????? Que veux-tu peinturlurer réellement et avec quelle condition ?? -- Salutations JJ
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Bonjour,
Il y a plusieurs erreurs dans ce code
1- supprimer end if ( if condition then résultat est sur la même ligne ,
pas besoin de "end if")
2-[VacDéb] doit existé, à priori ce serait [A2:J32].
3- If c* >= cel And c <= cel.Offset(0, 2) Then c*.Interior.ColorIndex = 34
*c= ?????
Que veux-tu peinturlurer réellement et avec quelle condition ??
--
Salutations
JJ
"Pascal" <lapless@wanadoo.fr> a écrit dans le message de news:
460cc2d9$0$25913$ba4acef3@news.orange.fr...
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Il y a plusieurs erreurs dans ce code 1- supprimer end if ( if condition then résultat est sur la même ligne , pas besoin de "end if") 2-[VacDéb] doit existé, à priori ce serait [A2:J32]. 3- If c* >= cel And c <= cel.Offset(0, 2) Then c*.Interior.ColorIndex = 34 *c= ????? Que veux-tu peinturlurer réellement et avec quelle condition ?? -- Salutations JJ
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
JB
Bonjour,
2 syntaxes pour If
If condition Then ... Else ... End If
et sur une seule ligne, pas de End If:
If condition Then ......
Sur ton exemple, Il faut supprimer le 2eme End If
JB
On 30 mar, 09:56, "Pascal" wrote:
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software.http://www.avast.com
Bonjour,
2 syntaxes pour If
If condition Then
...
Else
...
End If
et sur une seule ligne, pas de End If:
If condition Then ......
Sur ton exemple, Il faut supprimer le 2eme End If
JB
On 30 mar, 09:56, "Pascal" <lapl...@wanadoo.fr> wrote:
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.http://www.avast.com
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software.http://www.avast.com
Steph
Essaye ceci
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Essaye ceci
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then
c.Interior.ColorIndex = 34
Next cel
End If
"Pascal" <lapless@wanadoo.fr> a écrit dans le message de news:
460cc2d9$0$25913$ba4acef3@news.orange.fr...
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If
"Pascal" a écrit dans le message de news: 460cc2d9$0$25913$
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
LSteph
Bonjour, Lorsqu'on écrit un simple If ..Then....sur une même ligne pas besoin d'End if
On ne voit pas la définition de c ni cel cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours() Dim cel as range, c as range 'c=??? Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End Sub
'lSteph
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Bonjour,
Lorsqu'on écrit un simple
If ..Then....sur une même ligne
pas besoin d'End if
On ne voit pas la définition de c ni cel
cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours()
Dim cel as range, c as range
'c=???
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End Sub
'lSteph
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal
---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Bonjour, Lorsqu'on écrit un simple If ..Then....sur une même ligne pas besoin d'End if
On ne voit pas la définition de c ni cel cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours() Dim cel as range, c as range 'c=??? Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End Sub
'lSteph
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal
--- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Jacky
CQADED
-- Salutations JJ
"LSteph" a écrit dans le message de news:
Bonjour, Lorsqu'on écrit un simple If ..Then....sur une même ligne pas besoin d'End if
On ne voit pas la définition de c ni cel cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours() Dim cel as range, c as range 'c=??? Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End Sub
'lSteph
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal --- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
CQADED
--
Salutations
JJ
"LSteph" <lecocosteph@frite.fr> a écrit dans le message de news:
uJcT6H3cHHA.4684@TK2MSFTNGP06.phx.gbl...
Bonjour,
Lorsqu'on écrit un simple
If ..Then....sur une même ligne
pas besoin d'End if
On ne voit pas la définition de c ni cel
cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours()
Dim cel as range, c as range
'c=???
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34
Next cel
End Sub
'lSteph
Bonjour,
Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours()
Application.ScreenUpdating = False
[A2:J32].Interior.ColorIndex = xlNone
For Each cel In [VacDéb]
If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex =
34
Next cel
End If
J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux
Blocs??
Merci
Pascal ---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 000728-3, 29/03/2007
Analyse le : 30/03/2007 09:56:12
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Bonjour, Lorsqu'on écrit un simple If ..Then....sur une même ligne pas besoin d'End if
On ne voit pas la définition de c ni cel cel serait la Cell de la boucle dans le range [VacDéb]
Sub marqueJours() Dim cel as range, c as range 'c=??? Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End Sub
'lSteph
Bonjour, Pourquoi lorsque que j'éxécute cette macro
Sub marqueJours() Application.ScreenUpdating = False [A2:J32].Interior.ColorIndex = xlNone For Each cel In [VacDéb] If c >= cel And c <= cel.Offset(0, 2) Then c.Interior.ColorIndex = 34 Next cel End If J'ai un message End If sans bloc If. Je comprends pas j'ai bien mes deux Blocs??
Merci Pascal --- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000728-3, 29/03/2007 Analyse le : 30/03/2007 09:56:12 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com
Ce Qui A Déjà Etait Demandé Même dans le nouveau fil ;-(( -- Salutations JJ
"LSteph" a écrit dans le message de news: %
Spich Franch???
CQADED
LSteph
:-[[[ Oui mais moi "Môssieu" je donnais une réponse complète depuis hier 10:20 (à ce moment là j'étais le premier sur le coup)..que je croyais. -Le pourquoi du If -l'absence de définition de variable -la correction du code proposé et c'est pas ma faute si elle n'apparaît pas, donc je l'ai repostée!
;o))Bon Samedi quand même
lSteph
Ce Qui A Déjà Etait Demandé Même dans le nouveau fil ;-((
:-[[[
Oui mais moi "Môssieu" je donnais une réponse complète depuis hier 10:20
(à ce moment là j'étais le premier sur le coup)..que je croyais.
-Le pourquoi du If
-l'absence de définition de variable
-la correction du code proposé
et c'est pas ma faute si elle n'apparaît pas, donc je l'ai repostée!
;o))Bon Samedi quand même
lSteph
Ce Qui A Déjà Etait Demandé
Même dans le nouveau fil
;-((
:-[[[ Oui mais moi "Môssieu" je donnais une réponse complète depuis hier 10:20 (à ce moment là j'étais le premier sur le coup)..que je croyais. -Le pourquoi du If -l'absence de définition de variable -la correction du code proposé et c'est pas ma faute si elle n'apparaît pas, donc je l'ai repostée!
;o))Bon Samedi quand même
lSteph
Ce Qui A Déjà Etait Demandé Même dans le nouveau fil ;-((