Consulting

Results 1 to 3 of 3

Thread: Specify the position of a Minimized Userform

  1. #1
    VBAX Regular
    Joined
    Oct 2010
    Posts
    8
    Location

    Specify the position of a Minimized Userform

    Hi,
    Excel 2003
    I have added a Minimize button to a Userfom with this code
    http://www.excelforum.com/excel-prog...userforms.html

    lFormHandle = FindWindow("ThunderDFrame", Me.Caption)
    lStyle = GetWindowLong(lFormHandle, GWL_STYLE)
    lStyle = lStyle Or WS_SYSMENU 'SystemMenu
    lStyle = lStyle Or WS_MINIMIZEBOX 'With MinimizeBox
    SetWindowLong lFormHandle, GWL_STYLE, (lStyle)

    The form minimizes to the lower left and covers the sheet tabs.
    Is there a way to specify the position of the minimized from?

  2. #2
    VBAX Regular
    Joined
    Nov 2010
    Location
    Las Vegas Nv
    Posts
    74
    Location
    I don't believe you can change where it minimizes to, but you can hide it instead of minimizing it; maybe have a new sub:
    [VBA]
    Public Sub ToggleHide()
    UserForm1.Visible = Not UserForm1.Visible
    End Sub
    [/VBA]
    you can set a hotkey to that, and just
    [VBA]
    Call ToggleHide()
    [/VBA] on your minimize button. that way whether it's minimized with button or hotkey, it's not in the way, AND you can get back to it with a keystroke

  3. #3
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    I agree with sean.djsanti

Posting Permissions

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