Hello everyone
I have a code that disable X close in a userform
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) 
     
    If CloseMode = 0 Then 
        Cancel = True 
        MsgBox "The X is disabled, please use a button on the form.", vbCritical 
    End If 
     
End Sub
I need global procedure that can disable X Close on all userforms
Is there a way to do that?