JC de Lorient
XLDnaute Impliqué
Bonjour a tous et toutes
je ne trouve pas l'explication à ce bug
dans la macro suivante :
Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim a As String
Dim derl As Integer
a = InputBox('Entrez le nom de l'agent', 'Saisie')
If a = '' Then Exit Sub
UserForm1.ComboBox1 = Application.Proper(a)
derl = Sheets('Données').Range('C65536').End(xlUp).Row + 1
Sheets('Données').Range('C' & derl) = Application.Proper(a)
Sheets('Données').Range('C2:C' & derl).Select
Selection.Sort Key1:=Range('C2'), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
CommandButton1.SetFocus
End Sub
quand j'effectue la saisie normalemnt a partir de mon UserForm ça me plante à : Selection.sort
or quand j'effectue un pas à pas tout fonctionne !!!!!
ou est le loup ????
par avance mille merci
je ne trouve pas l'explication à ce bug
dans la macro suivante :
Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim a As String
Dim derl As Integer
a = InputBox('Entrez le nom de l'agent', 'Saisie')
If a = '' Then Exit Sub
UserForm1.ComboBox1 = Application.Proper(a)
derl = Sheets('Données').Range('C65536').End(xlUp).Row + 1
Sheets('Données').Range('C' & derl) = Application.Proper(a)
Sheets('Données').Range('C2:C' & derl).Select
Selection.Sort Key1:=Range('C2'), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
CommandButton1.SetFocus
End Sub
quand j'effectue la saisie normalemnt a partir de mon UserForm ça me plante à : Selection.sort
or quand j'effectue un pas à pas tout fonctionne !!!!!
ou est le loup ????
par avance mille merci