BASSDINGUE
XLDnaute Occasionnel
BONJOUR MES DAMES ET MESSIEURS
JE VOUDRAIS SAVOIR SI IL N'Y A PAS MOYEN DE FAIRE PLUS SIMPLE QUE CE QUE J'AI PONDU 'VOIR CE QUI EST PLUS BAS".
ET EN PLUS JE VOUDRAIS QUE SI ON A OUBLIER DE COCHER DANS UNE FRAME CONTENANT DES OPTION BUTTON IL Y EST UN MESSAGE D'ERREUR AINSI QU'UN FOCUS SUR LA FRAME CONSERNEE (j'ai bien essayé mais cela ne marche pas: il tournait en boucle sur le message de la frame 2 (fr2) meme si celle ci était cochée et en plus le focus ne ce faisait pas
VOILA, POUR CE MATIN !
SI QUELQU'UN A UNE IDEE
MERCI
------------
Dim c1 As Object, c2 As Object, c3 As Object, c4 As Object, c5 As Object, c6 As Object, c7 As Object
Dim temp1 As String, temp2 As String, temp3 As String, temp4 As String, temp5 As String, temp6 As String, temp7 As String
Dim L2 As Integer
For Each c1 In Me.FR1.Controls
If c1.Value = True Then
temp1 = c1.Caption
End If
Next c1
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("aa" & L2).Value = temp1
End With
For Each c2 In Me.FR2A.Controls
If c2.Value = True Then
temp2 = c2.Caption
End If
Next c2
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("ak" & L2).Value = temp2
End With
For Each c3 In Me.FR3A.Controls
If c3.Value = True Then
temp3 = c3.Caption
End If
Next c3
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("av" & L2).Value = temp3
End With
For Each c4 In Me.FR4A.Controls
If c4.Value = True Then
temp4 = c4.Caption
End If
Next c4
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bg" & L2).Value = temp4
End With
For Each c5 In Me.FR5.Controls
If c5.Value = True Then
temp5 = c5.Caption
End If
Next c5
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("z" & L2).Value = temp5
End With
For Each c6 In Me.FR6.Controls
If c6.Value = True Then
temp6 = c6.Caption
End If
Next c6
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bj" & L2).Value = temp6
End With
For Each c7 In Me.FR7.Controls
If c7.Value = True Then
temp7 = c7.Caption
End If
Next c7
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bl" & L2).Value = temp7
End With
JE VOUDRAIS SAVOIR SI IL N'Y A PAS MOYEN DE FAIRE PLUS SIMPLE QUE CE QUE J'AI PONDU 'VOIR CE QUI EST PLUS BAS".
ET EN PLUS JE VOUDRAIS QUE SI ON A OUBLIER DE COCHER DANS UNE FRAME CONTENANT DES OPTION BUTTON IL Y EST UN MESSAGE D'ERREUR AINSI QU'UN FOCUS SUR LA FRAME CONSERNEE (j'ai bien essayé mais cela ne marche pas: il tournait en boucle sur le message de la frame 2 (fr2) meme si celle ci était cochée et en plus le focus ne ce faisait pas
VOILA, POUR CE MATIN !
SI QUELQU'UN A UNE IDEE
MERCI
------------
Dim c1 As Object, c2 As Object, c3 As Object, c4 As Object, c5 As Object, c6 As Object, c7 As Object
Dim temp1 As String, temp2 As String, temp3 As String, temp4 As String, temp5 As String, temp6 As String, temp7 As String
Dim L2 As Integer
For Each c1 In Me.FR1.Controls
If c1.Value = True Then
temp1 = c1.Caption
End If
Next c1
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("aa" & L2).Value = temp1
End With
For Each c2 In Me.FR2A.Controls
If c2.Value = True Then
temp2 = c2.Caption
End If
Next c2
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("ak" & L2).Value = temp2
End With
For Each c3 In Me.FR3A.Controls
If c3.Value = True Then
temp3 = c3.Caption
End If
Next c3
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("av" & L2).Value = temp3
End With
For Each c4 In Me.FR4A.Controls
If c4.Value = True Then
temp4 = c4.Caption
End If
Next c4
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bg" & L2).Value = temp4
End With
For Each c5 In Me.FR5.Controls
If c5.Value = True Then
temp5 = c5.Caption
End If
Next c5
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("z" & L2).Value = temp5
End With
For Each c6 In Me.FR6.Controls
If c6.Value = True Then
temp6 = c6.Caption
End If
Next c6
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bj" & L2).Value = temp6
End With
For Each c7 In Me.FR7.Controls
If c7.Value = True Then
temp7 = c7.Caption
End If
Next c7
L2 = Sheets("table_client").Range("G65536").End(xlUp).Row + 1
With Sheets("table_client")
.Range("bl" & L2).Value = temp7
End With