+ Reply to Thread
Results 1 to 4 of 4

Word userform pulling data from Excel

  1. #1
    Registered User
    Join Date
    11-24-2008
    Location
    Moscow, Russia
    MS-Off Ver
    MS Office 2003, 2007
    Posts
    90

    Word userform pulling data from Excel

    Hello, everyone,

    I realize that the question is frequently ask but I could not find any solution that worked for me.

    I have a word document where I am creating a macro in order to generate standard report using a template and some data entered by users. I need to have a combobox on my form and four text boxes associated with it so that the users select values from the list, and the text boxes are filled automatically but can be edited. The data source is an Excel worksheet.
    I would also like the users to have an opportunity to add new rows in the datasource entering it in the form (and maybe using some special button).

    I'll be extremely grateful for any help
    Last edited by Freaky_zoid; 04-02-2009 at 07:06 AM.
    Trapped like a tiger in a washing machine

  2. #2
    Forum Administrator ExlGuru's Avatar
    Join Date
    03-17-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Word userform pulling data from Excel

    You can add a new row by this code:

    Please Login or Register  to view this content.
    ExlGuru

  3. #3
    Registered User
    Join Date
    11-24-2008
    Location
    Moscow, Russia
    MS-Off Ver
    MS Office 2003, 2007
    Posts
    90

    Re: Word userform pulling data from Excel

    Hi, ExlGuru,
    Thank you for the help. I managed to make a list of my items from the excel file, but when I open the userform there is a value selected in the combobox, and it is always the one in the fourth row. I can change it but I wonder how to make the box appear blank until a select any item from the list.
    combobox.Clear didn't help me. I also didn't find the fourth row (or third list item)mentioned anywhere in the code.
    And the button for inserting new rows doesn't work for some reason... the ".Insert" is hihglighted and the message says "Method or data member not found"

  4. #4
    Forum Administrator ExlGuru's Avatar
    Join Date
    03-17-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Word userform pulling data from Excel

    Typically after the ComboBox is bound you can add something as simple as:

    Please Login or Register  to view this content.
    which will be selected intially.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1