• User form enlarged (Win 2000, Office 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » User form enlarged (Win 2000, Office 2000)

    Author
    Topic
    #368572

    Hi,

    I have a word template, in which I have a Userform that appears when starting the template.

    In the Userform it is a text box where people (the user) shall type comments (text). When someone type more text than it is visibly possible to see, the text box can be configured such that it can contain many lines for text. But the lines visible are limited by the size of the box.

    Is it possible or does it exist a function such that the user can for example click a button and the text box opens in the size adjusted to the amount of text?

    The box should close again when finished typing in it and became the original box size.

    Thanks for any help in advance!

    bj

    Viewing 0 reply threads
    Author
    Replies
    • #577953

      What a fun request! The part about the box shrinking when it loses focus I did not try to code. The attached example has buttons to expand and contract the box (between 1 and 7 lines). Hope this helps.

      • #577954

        Thanks a lot.
        This will help. It looks as I can adjust the max height of the enlarged box, changing the code.

        I have seen in Remedy’s “Action Request System”. An application where they have a command button beside the text box and by clicking this one the box opens in a large form so that one can view all the text typed.

        Any way this will help in most cases.

        Again, thanks a lot!

        Bj

        • #578063

          Opening a second userform would be easier to code if there are a lot of controls to rearrange… If the text is large, you also could dump it to a temp file and open it in Notepad. This would free your first userform from waiting on another userform, but might confuse users into thinking they can edit in Notepad and “round trip” back to the userform.

      • #578188

        as another option, you could use the AutoSize property of the textbox to control its size. (setting the width at the end to restore its original width).

        Private Sub btnExpand_Click()
        With Me.TextBox1
        .AutoSize = True
        .AutoSize = False
        .Width = 190
        If .Height > 100 Then
        .Height = 100
        .ScrollBars = fmScrollBarsVertical
        End If
        End With

    Viewing 0 reply threads
    Reply To: User form enlarged (Win 2000, Office 2000)

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

    Your information: