+ Reply to Thread
Results 1 to 7 of 7

Copying specific cells from worksheet to activesheet

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Copying specific cells from worksheet to activesheet

    Good afternoon,
    I'm trying to "export" data from a static ws "order" (Sheet2) to a selected (active) worksheet. This will happen with 15 different (random) cells. I got this far but the copying isn't happening from the correct sheet or going to the active sheet. The data in "G5" on "order" should go to the first unused row on the active sheet. What I got was backwards. (Once I get the first one to work I can finish the code for the other 14 cells. I appreciate getting pointed in the right direction. I tried to tweak something that was going the other way - probably all wrong.)
    Please Login or Register  to view this content.
    Last edited by pprseller; 10-30-2009 at 06:29 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copying specific cells from worksheet to activesheet

    You might need to add a dot at the beginning, e.g.
    Please Login or Register  to view this content.
    But I'm a bit confused as to which sheet is which. Your code is currently taking values from "Order" and putting them into Sheet2 (code name).

    EDIT: may have figured out what you mean:
    Please Login or Register  to view this content.
    Last edited by StephenR; 10-30-2009 at 03:55 PM.

  3. #3
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Copying specific cells from worksheet to activesheet

    Thanks StephenR. I tested. Nothing happens. Probably not explaining clearly enough. I'll try again. Value on Sheet2("order") from G5 needs to go to the active sheet, col 1, first unused row. Etc from there. I may be way off course in what I wrote, too. I am struggling to grasp VB.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copying specific cells from worksheet to activesheet

    I think best if you mock up and attach a sample workbook.

  5. #5
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Copying specific cells from worksheet to activesheet

    Thank you for working on this. Attached is an example workbook. The first sheet called "order" is where users type in information. (That sheet will always be there and always named "order".) Then they can select from one of many worksheets to "export" the info they typed to the selected worksheet. That worksheet is one of many so I can't "hard" code to it. The "export" will have to go to "activesheet". Here, the selected worksheet is called "example". The info from "order" goes to the columns on the "example" worksheet - name to name, address to address or G5 to column 1, G6 to column 2, etc. Thanks again to any and all that help. I appreciate it.Mockorder2.xls

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copying specific cells from worksheet to activesheet

    It may just be that you need the +1 on the end here. Certainly, I tried it and something was copied over so it did something. Without the +1 it just overwrites the last entry each time.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Copying specific cells from worksheet to activesheet

    That's much better!! Thank you, thank you. I truly appreciate your persistance.

+ 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