Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    UserForm Textbox Entry into Footer (2000)

    Hello,

    I need to get the text from a UserForm textbox into a table cell/row in the footer of the document. Can someone be kind enough please to tell me exactly what I need to do to achieve that goal?

    Thank you very much.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: UserForm Textbox Entry into Footer (2000)

    If the insertion point is already in the proper table cell, then you could add code like this to the Button1_Click() procedure in your UserForm's code:

    Selection.InsertAfter TextBox1.Value

    However, if you need to locate this cell, or insert a table from scratch, there are many, many more steps.

    What's the scenario? Can you post a sample document?

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: UserForm Textbox Entry into Footer (2000)

    Per Jefferson's suggestion, it would be useful to see a sample of the document layout, but here is something generic that you can try -
    the following assumes a table in the primary footer of section one, and that you want to insert the text into the first cell in the table:

    ActiveDocument.Sections(1).Footers(wdHeaderFooterP rimary).Range.Tables(1).Rows(1).Cells(1).Range.Tex t = TextBox1.Value
    (this may wrap onscreen but is all one line of code)

    This method doesn't require that you "go into" the footer.

    Gary

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm Textbox Entry into Footer (2000)

    Hi,

    I forgot to mention that it's a protected form - but once I added the unprotect/protect code to this generic code - it worked beautifully.

    Thanks for your help guys.

Posting Permissions

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