Re : userform en plein écran quelques soit la taille.
Bonjour Reinruof, Jean-Marcel
Tu peux tester ce code:
Code VBA:
Private Sub UserForm_Initialize()
Dim NBentree As Long, i As Integer
'Adapte à la taille de l'application Excel
Me.Width = Application.Width - 40
Me.Height = Application.Height - 40
Me.Left = 0
Me.Top = 0
a = Cells(65535, 3).End(xlUp).Row
NBentree = Sheets("Feuil1").Cells(65535, 1).End(xlUp).Row - 2
Call Remplir_Combobox
With ListView1
.View = lvwReport
.FullRowSelect = True
.Gridlines = True
.ColumnHeaders.Add , , Cells(2, 1), 50
.ColumnHeaders.Add , , Cells(2, 2), 50
.ColumnHeaders.Add , , Cells(2, 3), 50
.ColumnHeaders.Add , , Cells(2, 4), 160
.ColumnHeaders.Add , , Cells(2, 5), 200
.ColumnHeaders.Add , , Cells(2, 6), 210
.ColumnHeaders.Add , , Cells(2, 7), 200
.ColumnHeaders.Add , , Cells(2, 8), 50
.ColumnHeaders.Add , , Cells(2, 9), 50
.ColumnHeaders.Add , , Cells(2, 10), 50
.ColumnHeaders.Add , , Cells(2, 11), 70
.ColumnHeaders.Add , , Cells(2, 12), 50
.ColumnHeaders.Add , , Cells(2, 13), 50
.ColumnHeaders.Add , , Cells(2, 14), 50
.ColumnHeaders.Add , , Cells(2, 15), 50
.ColumnHeaders.Add , , Cells(2, 16), 50
.ColumnHeaders.Add , , Cells(2, 17), 50
.ColumnHeaders.Add , , "Ligne", 50, lvwColumnLeft
End With
For i = 1 To 6
' Me("Textbox" & i).Visible = False
Next
End Sub