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 Declare Function GetWindowLong Lib "User32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Const GWL_STYLE As Long = (-16)
Private iStyle As Long
Private hWnd As Long
Private maform As Object
Sub toto()
hWnd = FindWindow(vbNullString, maform.Caption)
iStyle = GetWindowLong(hWnd, -16) Or &H70000
SetWindowLong hWnd, -16, iStyle
End Sub
Private Sub UserForm_Initialize()
Set maform = Me
toto
End Sub