+ Reply to Thread
Results 1 to 3 of 3

Disabling Move for Userform

  1. #1
    Francis Ang
    Guest

    Disabling Move for Userform

    Happy New Year to All!

    Displayed userform can be moved around. Can this 'move' properties be
    disabled using VBA?

    Thanks.

  2. #2
    Michel Pierron
    Guest

    Re: Disabling Move for Userform

    Hi Francis,

    Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu _
    As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
    Private Declare Function GetSystemMenu Lib "user32" _
    (ByVal hwnd As Long, ByVal bRevert 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()
    RemoveMenu GetSystemMenu(FindWindow _
    (vbNullString, Me.Caption), 0), 1, &H400
    End Sub

    MP

    "Francis Ang" <[email protected]> a écrit dans le message
    de news:[email protected]...
    > Happy New Year to All!
    >
    > Displayed userform can be moved around. Can this 'move' properties be
    > disabled using VBA?
    >
    > Thanks.



  3. #3
    Francis Ang
    Guest

    Disabling Move for Userform

    Thank you very much Michel. I really appreciate your help.


    "Michel Pierron" wrote:

    > Hi Francis,
    >
    > Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu _
    > As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
    > Private Declare Function GetSystemMenu Lib "user32" _
    > (ByVal hwnd As Long, ByVal bRevert 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()
    > RemoveMenu GetSystemMenu(FindWindow _
    > (vbNullString, Me.Caption), 0), 1, &H400
    > End Sub
    >
    > MP
    >
    > "Francis Ang" <[email protected]> a écrit dans le message
    > de news:[email protected]...
    > > Happy New Year to All!
    > >
    > > Displayed userform can be moved around. Can this 'move' properties be
    > > disabled using VBA?
    > >
    > > Thanks.

    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1