View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Halim Halim is offline
external usenet poster
 
Posts: 182
Default Hide the X on a user form

just once more...
Place that code into Userform module behind your userform

--
Regards,

Halim



"Halim" wrote:

Hi David,

I hope you aggree with this one, that used API calls to hide X :
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 FindWindow _
Lib "user32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) _
As Long

Private Sub UserForm_Initialize()
SetWindowLong FindWindow(vbNullString, Me.Caption), _
-16, -2067791744
End Sub


--
Regards,

Halim



"David A." wrote:

I wamt to hide the X in the top right corner of a UserForm. Can this be done
and if not how do I disable it?