Re : valeur celulle dans label
re bonjour
Désolé mais je pensais (et c'est faux ) qu'avec votre solution je pourrais m'en sortir tous seul Mais voila........
j'essaye d'adapter votre solution à mes besoins et le ni arrive pas .... ( c'est pas étonnent vu mon niveau )
en faite j'ai 14 colonne de données soit 14 info pour chaque personnes et je pensais "simplement" quand modifiant le code comme cela fonctionnerais
mais ce n'est pas le cas pourriez vous m'expliquer pourquoi ? ( j'aime bien comprendre ce que je fais)
par avance merci
Private Sub ComboBox1_Change()
Dim i As Integer, Drl As Integer, j As Integer
With Sheets("Base donnée")
Drl = .Range("A65500").End(xlUp).Row
For i = 2 To Drl
If .Cells(i, 1).Value = ComboBox1.Value Then
For j = 1 To 15
Controls("TextBox" & j).Value = .Cells(i, 1).Offset(, j)
Next j
End If
Next i
End With
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim c As Range
Dim Drl As Integer
If ComboBox1.ListCount > 0 Then Exit Sub
With Sheets("Base donnée")
Drl = .Range("A65500").End(xlUp).Row
For Each c In .Range("A2:A" & Drl)
ComboBox1.AddItem c
Next c
End With
End Sub
Private Sub imprimer_Click()
Me.PrintForm '.........Impression de l'UserForm.....
End Sub
Private Sub fermer_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Unload Me
End Sub
Private Sub UserForm_Activate()
'=====================================================
FrmWndh = FindWindow(vbNullString, Me.Caption) ' ====
lStyle = GetWindowLong(FrmWndh, GWL_STYLE) ' ====
lStyle = lStyle And Not WS_CAPTION ' ====
SetWindowLong FrmWndh, GWL_STYLE, lStyle ' ====
'=====================================================
End Sub
Private Sub UserForm_Initialize()
End Sub
'================================================
Dim Style As Long ' ====
Hwnd = FindWindow(vbNullString, Me.Caption) '====
SetWindowLong Hwnd, -16, Style ' ====
DrawMenuBar Hwnd ' ====
'================================================
End Sub