bonsoir a tous et toutes
j'ai répondu dans ce posthttps://forum.excel-pratique.com/excel/rendre-inactive-la-croix-rouge-feuille-excel-t78375.html pour enlever la croix de fermeture d'un userform
j'ai aussi ce lien http://www.gcexcel.com/enlever-la-croix-rouge-dun-userform/
et aussi ce code pour un module standart
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
Sub SupprimerCroixFermeture(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
+ Dans le module de l'userform
Private Sub UserForm_Initialize()
SupprimerCroixFermeture Me
End Sub
ce code viens de l'excellent BANZAI64
ma question est comment peut on rétablir la croix et son fonctionnement
bonne soirée et bon weekend a tous et toutes