• ActiveX Control Focus on Open

    Author
    Topic
    #488394

    Word 2007

    Have single page document that has an ActiveX Text Box in the body of the document – not on a user form.

    For the life of me I cannot get the text box to take focus on the Document_Open event. I have tried mulitple variations, including the two below but the insertion point is always at the top of the document when it loads and not in the stinking text box.

    Sub Document_Open()
    With Me.txtKWH
    .SelStart = 0
    .SelLength = Len(.Text)
    End With
    End Sub

    Sub Document_Open()
    Me.txtKWH.SetFocus
    End Sub

    I know this is something simple. I probably need my senior nap… Thanks in advance for any guidance.

    Reply To: ActiveX Control Focus on Open

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

    Your information: