je pense que le fil "worksheet selectionchange fonctionnement ?" devrait te donner une piste, ou au moins des idées... ,-)
mac
"Guy72" a écrit dans le message de news:
Bonsoir Est-il possible de faire démarrer une macro avec une fonction SI . Par exemple =Si (A1 100; Macro1 ( );"") Cordialement Guy
JLuc
*Bonjour Guy72*, Oui, dans l'événement : Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then MaMacro End If End Sub
Bonsoir Est-il possible de faire démarrer une macro avec une fonction SI . Par exemple =Si (A1 100; Macro1 ( );"") Cordialement Guy
-- ____ ( O | O ) -- _oooO_ JLuc _Oooo_
O-O
*Bonjour Guy72*,
Oui, dans l'événement :
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1
Then
If Target = 100 Then MaMacro
End If
End Sub
Bonsoir
Est-il possible de faire démarrer une macro avec une fonction SI .
Par exemple =Si (A1 100; Macro1 ( );"")
Cordialement
Guy
*Bonjour Guy72*, Oui, dans l'événement : Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then MaMacro End If End Sub
Bonsoir Est-il possible de faire démarrer une macro avec une fonction SI . Par exemple =Si (A1 100; Macro1 ( );"") Cordialement Guy
-- ____ ( O | O ) -- _oooO_ JLuc _Oooo_
O-O
Michel Gaboly
Bonsoir,
Ce n'est pas la peine d'utiliser Intersect si tu te limites au cas où T arget.Count = 1 !
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing If Range("A1") = 100 Then MaMacro End If End Sub
*Bonjour Guy72*, Oui, dans l'événement : Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then MaMacro End If End Sub
Bonsoir Est-il possible de faire démarrer une macro avec une fonction SI . Par exemple =Si (A1 100; Macro1 ( );"") Cordialement Guy
-- Cordialement,
Michel Gaboly www.gaboly.com
Bonsoir,
Ce n'est pas la peine d'utiliser Intersect si tu te limites au cas où T arget.Count = 1 !
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing
If Range("A1") = 100 Then MaMacro
End If
End Sub
*Bonjour Guy72*,
Oui, dans l'événement :
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then
If Target = 100 Then MaMacro
End If
End Sub
Bonsoir
Est-il possible de faire démarrer une macro avec une fonction SI .
Par exemple =Si (A1 100; Macro1 ( );"")
Cordialement
Guy
Ce n'est pas la peine d'utiliser Intersect si tu te limites au cas où T arget.Count = 1 !
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing If Range("A1") = 100 Then MaMacro End If End Sub
*Bonjour Guy72*, Oui, dans l'événement : Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then MaMacro End If End Sub
Bonsoir Est-il possible de faire démarrer une macro avec une fonction SI . Par exemple =Si (A1 100; Macro1 ( );"") Cordialement Guy
-- Cordialement,
Michel Gaboly www.gaboly.com
Guy72
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Sub Cellule2 () Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End If
Cordialement Guy
Bonsoir à tous
J'ai essayé ça mais ça ne fonctionne pas.
Je suppose que c'est pas la bonne solution ?
Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1
Then
If Target = 100 Sub Cellule2 ()
Range("A1").Select
For compteur = 1 To 20
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End If
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Sub Cellule2 () Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End If
Cordialement Guy
JLuc
Guy72 avait soumis l'idée :
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then Cellule2 End If End Sub
Sub Cellule2() Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End Sub
Cordialement Guy
-- JLuc
Guy72 avait soumis l'idée :
Bonsoir à tous
J'ai essayé ça mais ça ne fonctionne pas.
Je suppose que c'est pas la bonne solution ?
Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1
Then
If Target = 100 Then Cellule2
End If
End Sub
Sub Cellule2()
Range("A1").Select
For compteur = 1 To 20
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End Sub
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then Cellule2 End If End Sub
Sub Cellule2() Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End Sub
Cordialement Guy
-- JLuc
Guy72
Bonjour Jean-Luc Ok merci, moi je mettais "Sub Cellule2" Cordialement Guy
"JLuc" a écrit dans le message de news:
Guy72 avait soumis l'idée :
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then Cellule2 End If End Sub
Sub Cellule2() Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End Sub
Cordialement Guy
-- JLuc
Bonjour Jean-Luc
Ok merci, moi je mettais "Sub Cellule2"
Cordialement
Guy
"JLuc" <ns.jeanluc.laurent@free.fr.ns> a écrit dans le message de news:
mn.52447d6ac66ec39d.42854@free.fr.ns...
Guy72 avait soumis l'idée :
Bonsoir à tous
J'ai essayé ça mais ça ne fonctionne pas.
Je suppose que c'est pas la bonne solution ?
Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then
If Target = 100 Then Cellule2
End If
End Sub
Sub Cellule2()
Range("A1").Select
For compteur = 1 To 20
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End Sub
Bonjour Jean-Luc Ok merci, moi je mettais "Sub Cellule2" Cordialement Guy
"JLuc" a écrit dans le message de news:
Guy72 avait soumis l'idée :
Bonsoir à tous J'ai essayé ça mais ça ne fonctionne pas. Je suppose que c'est pas la bonne solution ? Quelle est la solution ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1"))Is Nothing And Target.Count = 1 Then If Target = 100 Then Cellule2 End If End Sub
Sub Cellule2() Range("A1").Select For compteur = 1 To 20 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01")
With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With Application.Wait Now + TimeValue("00:00:01") Next End Sub