Bonjour jeunixe
A tester
Dim Fichier
Private Sub CommandButton1_Click()
Dim derlign As Long
With Sheets("Feuil1")
derlign = .Range("A" & Rows.Count).End(xlUp).Row + 1
.Range("A" & derlign).Value = Me.TB1.Value
.Range("B" & derlign).Value = Me.TB2.Value
.Range("C" & derlign).Value = Me.TB3.Value
.Range("D" & derlign).Value = Me.TB4.Value
.Range("E" & derlign).Value = Me.TB5.Value
.Range("F" & derlign).Value = Me.TB6.Value
.Range("A1:F" & derlign).Sort key1:=.Range("A1"), order1:=xlAscending, dataoption1:=xlSortNormal, Header:=xlYes
End With
Name Fichier As "C:\Nouveau dossier\" & Me.TB1 & ".jpg"
Unload Me
BADGE.Show
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub Label8_Click()
Dim shp, Lplage, HPlage, Lshp, Hshp, r1, r2, r, pict
Label8.Visible = False
'récupérer le nom du fichier image
Fichier = Application.GetOpenFilename("Tous les fichiers (*.*),*.*")
If Fichier = False Then Exit Sub
On Error GoTo ERR_01
Set pict = LoadPicture(Fichier)
Me.Image1.Width = Int(pict.Width / 26.44) / (Int(pict.Height / 26.44) / Me.Image1.Height)
Me.Width = Me.Image1.Left + Me.Image1.Width + 40
Image1.Picture = LoadPicture(Fichier)
Exit Sub
ERR_01:
MsgBox "le fichier n'est pas une image ?"
Image1.Picture = LoadPicture("")
Fichier = False
Label8.Visible = True
Resume Next
End Sub