Bonjour tom, gagletor,
essaie ceci, trouvé sur ce Forum :
Coller ce code dans un module
Option Private Module
Declare Function GetWindowLongA Lib 'User32' _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Declare Function SetWindowLongA Lib 'User32' _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function FindWindowA Lib 'User32' _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'Moyen de ne pas avoir la CROIX DE FERMETURE sur les UserForms
Sub PasDeCroix(USF As UserForm)
Dim hWnd As Long
hWnd = FindWindowA('Thunder' & IIf(Application.Version Like '8*', _
'X', 'D') & 'Frame', USF.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) And &HFFF7FFFF
End Sub
Ensuite dans le procedure d'initialisation de ta userform tu mets ca :
Private Sub UserForm_Initialize()
PasDeCroix Me
End Sub
Si tu veux juste désactiver la croix tu peux faire (elle sera toujours visible mais ne fermera plus l'USF)
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub