Evelynetfrancois
XLDnaute Impliqué
bonjour à tous
Grace à vous j ai obtenu cette macro qui fonctionne tres bien si CommandButton3 se trouve sur la feuille concernée
mais si je place le contenu de cette meme macro [Private Sub CommandButton3_Click()] dans un USF sur un OptionButton3 ça ne marche plus
et je ne comprend pas pourquoi !!
pouvez vous m aider a comprendre mon erreur?
je vous en remercie d avance
bonne soirée à tous
E et F
Public Flag As Boolean
___________________________________________________________
Private Sub CommandButton3_Click()
Range("D3:E600").Activate
Flag = 1
Selection.ClearContents
Range("A3").Select
End Sub
______________________________________________________________
Private Sub Worksheet_Change(ByVal Target As Range)
If Flag = 0 Then
If Not Application.Intersect(Target, Range("E3:E65536")) Is Nothing Then
RETOUR = MsgBox("Voulez-vous valider cette commande ", 4 + vbInformation, " V A L I D A T I O N ")
If RETOUR = vbYes Then
Application.ScreenUpdating = False
Range("A" & ActiveCell.Row & ":F" & ActiveCell.Row).Copy
Sheets("COMMANDES").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
UserForm1.Show
Application.ScreenUpdating = True
End If
End If
End If
Flag = 0
End Sub
Grace à vous j ai obtenu cette macro qui fonctionne tres bien si CommandButton3 se trouve sur la feuille concernée
mais si je place le contenu de cette meme macro [Private Sub CommandButton3_Click()] dans un USF sur un OptionButton3 ça ne marche plus
et je ne comprend pas pourquoi !!
pouvez vous m aider a comprendre mon erreur?
je vous en remercie d avance
bonne soirée à tous
E et F
Public Flag As Boolean
___________________________________________________________
Private Sub CommandButton3_Click()
Range("D3:E600").Activate
Flag = 1
Selection.ClearContents
Range("A3").Select
End Sub
______________________________________________________________
Private Sub Worksheet_Change(ByVal Target As Range)
If Flag = 0 Then
If Not Application.Intersect(Target, Range("E3:E65536")) Is Nothing Then
RETOUR = MsgBox("Voulez-vous valider cette commande ", 4 + vbInformation, " V A L I D A T I O N ")
If RETOUR = vbYes Then
Application.ScreenUpdating = False
Range("A" & ActiveCell.Row & ":F" & ActiveCell.Row).Copy
Sheets("COMMANDES").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
UserForm1.Show
Application.ScreenUpdating = True
End If
End If
End If
Flag = 0
End Sub