+ Reply to Thread
Results 1 to 9 of 9

Populating Cells with Info from another Sheet...

  1. #1
    Registered User
    Join Date
    04-23-2007
    Posts
    24

    Populating Cells with Info from another Sheet...

    Hi,

    I am trying to create an excel macro/command button where I am able to copy information from a selected row (selected by a tick box for example) to other cells on a different tab within the same workbook (eg.Sheet 2) where I already have a ready made "template/Top Sheet" that will then be printed out.

    I tried this with tickboxes and textboxes but couldnt seem to get it to work (tho I am pretty sure this is the right way to do this..)

    Can anyone point me in the right direction at all??

    Thanks in advance..

  2. #2
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Hello RKA81,

    Would it be possible for you to post a copy of your workbook so we can see what exactly you are wanting to do.

    From what you have described (and I may not be understanding things at all), it sounds like the easiest way to do what you are wanting is to have a column where you can mark the ones you one copied. Then, using VB code, run through the list moving each one that has been marked. The code can be attached to a button on the worksheet, if you would like.

    If you can post your workbook or at least a detailed sample, I will be more than willing to try and help you out.
    Sincerely,
    Jeff

  3. #3
    Registered User
    Join Date
    04-23-2007
    Posts
    24

    Smile

    Quote Originally Posted by boylejob
    Hello RKA81,

    Would it be possible for you to post a copy of your workbook so we can see what exactly you are wanting to do.

    From what you have described (and I may not be understanding things at all), it sounds like the easiest way to do what you are wanting is to have a column where you can mark the ones you one copied. Then, using VB code, run through the list moving each one that has been marked. The code can be attached to a button on the worksheet, if you would like.

    If you can post your workbook or at least a detailed sample, I will be more than willing to try and help you out.
    Thanks for your response - I have attached a basic copy that hopefully makes sense.. If you are able to point me in the right direction for doing just one cell, then i should be able to amend it to copy the rest of the details i need....thanks again
    Attached Files Attached Files

  4. #4
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    rka81,

    I have two ways you can do this.

    1. We can create a new sheet on each one with a Y

    2. We can post the data to Sheet2, print it and clear it. Repeating this process until all Y's have been done. If you like this option, I need for you to do one thing form me. Turn on the macro recorder and print a page to the printer you will be using. Stop the recorder and send me the code it recorded. This will give me your printer address.

    If you can tell me, which way is best for you I can head that direction.

  5. #5
    Registered User
    Join Date
    04-23-2007
    Posts
    24
    Quote Originally Posted by boylejob
    rka81,

    I have two ways you can do this.

    1. We can create a new sheet on each one with a Y

    2. We can post the data to Sheet2, print it and clear it. Repeating this process until all Y's have been done. If you like this option, I need for you to do one thing form me. Turn on the macro recorder and print a page to the printer you will be using. Stop the recorder and send me the code it recorded. This will give me your printer address.

    If you can tell me, which way is best for you I can head that direction.
    Option 2 would be the one i would go for...

    The only code i got from doing the macro recorder and printing was...

    "ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True"

    No printer address....?

  6. #6
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    rka81,

    We will go for option 2 then. The information you sent is fine. I just wanted to make sure you were not sending to a network printer where an address would be needed.

    I should have your program ready shortly.

  7. #7
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    rka81,

    Okay, give this a try. I created subs that would do both of the options I gave you.

    1. MoveDataToTabs creates a new sheet for each company you have checked.

    2. MoveAndPrint moves the data to sheet2, prints it, and then clears the data on the sheet.

    Currently MoveAndPrint is attached to the lower button on Sheet1. I am not sure what is going on with the button you already had on the sheet. I could not delete it, attach a macro to it, or adjust the properties so I just added another one.

    I added a few more lines to your sample just to make sure things appeared to be working correctly. Keep in mind I have not thoroughly tested this program so it could need a little tweeking.

    I hope this works for you.

    Let me know!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-23-2007
    Posts
    24
    Thanks Jeff, you have really been helpful - really appreciated

    That is exacty what i wanted..

    Thanks

  9. #9
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    rka81,

    Glad I could be of help and it was certainly my pleasure.

+ 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