Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message de
news:3F35BB95-A40B-4409-B0A9-1B0D96545FE1@microsoft.com...
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit. Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message
de
news:3F35BB95-A40B-4409-B0A9-1B0D96545FE1@microsoft.com...
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message de
news:0F5385E1-9DB3-4D91-9464-6361B95B2FD2@microsoft.com...
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message
de
news:3F35BB95-A40B-4409-B0A9-1B0D96545FE1@microsoft.com...
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message de
news:0F5385E1-9DB3-4D91-9464-6361B95B2FD2@microsoft.com...
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message
de
news:3F35BB95-A40B-4409-B0A9-1B0D96545FE1@microsoft.com...
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) > > vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re Re
Pour + d'explications, je te fais parvenir un fichier en Ci-Joint.
LA commande ValideSaisie me renvoie en Sub ValideSaisie() pour la suite du
traitement et la, sa plante.
http://cjoint.com/?dEl2RrRYcK
Re mercieRe,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) >>> vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re Re
Pour + d'explications, je te fais parvenir un fichier en Ci-Joint.
LA commande ValideSaisie me renvoie en Sub ValideSaisie() pour la suite du
traitement et la, sa plante.
http://cjoint.com/?dEl2RrRYcK
Re mercie
Re,
Fais l'essai en remplaçant :
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message de
news:0F5385E1-9DB3-4D91-9464-6361B95B2FD2@microsoft.com...
Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) >>> vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.
Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" <Peponne31@discussions.microsoft.com> a écrit dans le message
de
news:3F35BB95-A40B-4409-B0A9-1B0D96545FE1@microsoft.com...
Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31
Re Re
Pour + d'explications, je te fais parvenir un fichier en Ci-Joint.
LA commande ValideSaisie me renvoie en Sub ValideSaisie() pour la suite du
traitement et la, sa plante.
http://cjoint.com/?dEl2RrRYcK
Re mercieRe,
Fais l'essai en remplaçant :If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
par :
If Target.Address = "$J$6" Then ValideSaisie
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message de
news:Bonjour Philippe.R
merci de ta réponse mais ça ne fonctionne pas, je me demande si en ligne 3
Then
Exit Sub ne serai pas la cause de mon problème.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20
AndTarget.Row <51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) >>> vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
Merci pour vos suggestoins.Bonsoir,
Oui, tu peux (dois) à priori tout réunir dans une même sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
If Target.Column = Range("F1").Column And Target.Row > 20 And Target.Row
<
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
Application.ScreenUpdating = true
End Sub
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Peponne31" a écrit dans le message
de
news:Bonsoir,
sur une page j'ai 2 fois la mème instruction et je suis en conflit.
Est-il
possible de les réunir ?
voici la première instruction
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address <> "$J$6" Then Exit Sub
ValideSaisie
End Sub
et la deuxième
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("F1").Column And Target.Row > 20 And
Target.Row <
51 Then
If Target = "m2" Or Target = "m3" Then
If MsgBox("Voulez calculer " & Target & " ??", vbYesNo) = vbYes Then
Sheets("Calcul_" & Target).Activate
End If
End If
End If
End Sub
je voudrais un seul:Private Sub Worksheet_Change(ByVal Target As Range)
pour ne pas avoir de conflit et réunir les 2 codes.
merci par avance si quelqu'un peut me dépanner.
Peponne31