• Can I dock my form

    Author
    Topic
    #464796

    Hello. (Excel 2003)
    Can a VBA UserForm be docked to the right-hand side? Andy.

    Viewing 5 reply threads
    Author
    Replies
    • #1191442

      No…

    • #1191443

      I suppose you could either remove its title bar or use something klunky like:

      Code:
      Private Sub UserForm_Activate()
          SetPos
      End Sub
      Sub SetPos()
          With Me
              .Top = 0
              .Left = Application.ActiveWindow.Width - .Width - 5
          End With
      
      End Sub
      
      Private Sub UserForm_Layout()
          SetPos
      End Sub
      
    • #1191446

      This is a bit neater.

    • #1191448

      Thank you. Although I should have mentioned that I wanted to dock it to the right, which is a bit trickier?! Andy.

    • #1191449

      Both versions dock on the right…

    • #1191475

      You can put a userform inside a taskpane using a dll Stephen Bullen has written:
      http://www.oaltd.co.uk Look for CTPUserformhost (near top of page)

    Viewing 5 reply threads
    Reply To: Can I dock my form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: