Ivan F Moala Wrote:
Put the code in the Userform Module code.
If you use Excel 97 then you will need to change the Enum bit t
Constants.
Just remove the
Private Enum ESetWindowPosStyles
and
End Enum
and precede it with Const!
or better
#If VBA6 Then
Private Enum ESetWindowPosStyles
SWP_SHOWWINDOW = &H40
SWP_HIDEWINDOW = &H80
SWP_FRAMECHANGED = &H20
SWP_NOACTIVATE = &H10
SWP_NOCOPYBITS = &H100
SWP_NOMOVE = &H2
SWP_NOOWNERZORDER = &H200
SWP_NOREDRAW = &H8
SWP_NOREPOSITION = SWP_NOOWNERZORDER
SWP_NOSIZE = &H1
SWP_NOZORDER = &H4
SWP_DRAWFRAME = SWP_FRAMECHANGED
HWND_NOTOPMOST = -2
End Enum
#Else
Const SWP_SHOWWINDOW = &H40
Const SWP_HIDEWINDOW = &H80
Const SWP_FRAMECHANGED = &H20
Const SWP_NOACTIVATE = &H10
Const SWP_NOCOPYBITS = &H100
Const SWP_NOMOVE = &H2
Const SWP_NOOWNERZORDER = &H200
Const SWP_NOREDRAW = &H8
Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Const SWP_NOSIZE = &H1
Const SWP_NOZORDER = &H4
Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Const HWND_NOTOPMOST = -2
#End I
--
xl
-----------------------------------------------------------------------
xld's Profile:
http://www.excelforum.com/member.php...nfo&userid=975
View this thread:
http://www.excelforum.com/showthread.php?threadid=37952