Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_style = (-16)
Private Const CLOSEBOX As Long = &H80000
Private Sub UserForm_Initialize()
Dim hWndform As Long
Dim Istyle As Long
hWndform = FindWindow("Test", Me.Caption)
Istyle = Istyle And Not CLOSEBOX
SetWindowLong hWndform, GWL_style, Istyle
End Sub