Consulting

Results 1 to 2 of 2

Thread: Referencing Multiple Cells

  1. #1

    Referencing Multiple Cells

    Hello,

    This topic is a next-phase of my thread posted here.
    http://www.vbaexpress.com/forum/showthread.php?p=169826

    The attached script, creates a word document when a command button is clicked, the word document is created, based on information in a specific row on the Excel sheet. (Ie: so if I clicked the command button on line3, the word document would only be built based on information in line3, and so on)

    Now within the body of the word document is a file number, which comes from the excel sheet in column "L"..My question is, what if a user needs to select more than one cell in column "L" (for instance what if I need to select, column L, row 3, 4, 5...and I want those all to appear in the body of my word document? How would I make that happen?

    I know I have to some-how make it so that a check box automatically appears on every line...but only the selected check boxes get included when the word document is made...

    Anyone know how Id make use of something like this?

    Let me know!

    Thanks!

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Wow, You are writing the entire letter in the code module...

    You really should visit the Word forum and link to this. A template would make this much easier to set up and maintain.

    I've attached a simple demo of how to use row data to fill bookmarks in a template to print multiple documents to different people. I know it's not what you are doing here but it will give you some real insights into the advantages of using templates and bookmarks to place your data exactly where you want it.

    The following thread is a good reference for using bookmarks.

    http://www.vbaexpress.com/forum/showthread.php?t=11427
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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