Consulting

Results 1 to 15 of 15

Thread: Populate multiple templates using 1 userform

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Populate multiple templates using 1 userform

    Hello. I have multiple forms that require the same set of data. What I am trying to do is see if I can create one userform, enter the data in there and have it populate the required fields across multiple templates/files.

    I am able to do this in a single document by using bookmarks and have what is entered in the userform to populate those bookmarks. But wanted a way where this can be done across multiple documents at once.

    Here is what I have so far:

    Private Sub CommandButton1_Click()

    Dim fname As Range
    Set fname = ActiveDocument.Bookmarks("fname").Range
    fname.Text = Me.TextBox1.Value

    Dim lname As Range
    Set lname = ActiveDocument.Bookmarks("lname").Range
    lname.Text = Me.TextBox2.Value

    Dim address As Range
    Set address = ActiveDocument.Bookmarks("address").Range
    address.Text = Me.TextBox3.Value

    Dim dob As Range
    Set dob = ActiveDocument.Bookmarks("dob").Range
    dob.Text = Me.TextBox4.Value

    Dim amount As Range
    Set amount = ActiveDocument.Bookmarks("amount").Range
    amount.Text = Me.TextBox5.Value

    Dim period As Range
    Set period = ActiveDocument.Bookmarks("period").Range
    period.Text = Me.TextBox6.Value

    Me.Repaint
    UserForm1.Hide

    End Sub


    Private Sub Label4_Click()

    End Sub

    Private Sub TextBox4_Change()

    End Sub

    Private Sub UserForm_Click()

    End Sub


    Any help is appreciated. thank you!
    Last edited by lordbodom; 08-18-2020 at 11:37 PM.

Posting Permissions

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