Bonjour,
Essaie ce code à mettre dans Userform :
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Sub UserForm_Initialize()
Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And &HFF77FFFF
zFactor = 100 * CInt(Application.Width / Me.Width)
If zFactor > 400 Then zFactor = 400
Me.Width = Application.Width
Me.Height = Application.Height
Me.Zoom = zFactor
End Sub
Dans ton USF, n'oublie pas de mettre un bouton et code associé pour fermer ton Userform car dans le cas contraire tu ne pourras plus fermer excel ... (sauf manière forte bien sûr..)
Amcialement
Edit Dan :
Tu peux aussi essayer ceci :
Dans l'Userform tu places ce code
Private Sub UserForm_Initialize()
With UserForm1
.Top = 0
.Left = 0
.Width = Application.Width
.Height = Application.Height
End With
End Sub
Dans THISWORKBOOK, tu mets ce code
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Application.WindowState = xlMaximized
End Sub
Amicalement