+ Reply to Thread
Results 1 to 11 of 11

Copying cell values to different file

  1. #1
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Copying cell values to different file

    Hello,

    I've got a quote template where if the user enters a customer contact information that doesn't appear on a database excel file, then it will automatically add it to the database file. I've got everything to work (selecting value, opening database file etc..) except for moving the contact information over to the database excel file. It works by getting the company name on the template file, then finds and selects the cell that has the same company name. I need it to then take the contact first name from the template and copy it to the same row (but 4 columns to the right) the company name is on in the database file. Hopefully that makes sense. Here is the code:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    Try this:

    Please Login or Register  to view this content.
    Last edited by davegugg; 06-03-2011 at 03:30 PM.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    Or better:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Copying cell values to different file

    Hi Dave, I tried your first suggestion as I didn't need to modify the rest of the code all that much, but it didn't work. It's not populating any info into the database file. Thanks.

    Quote Originally Posted by davegugg View Post
    Try this:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    No need to quote my whole post. When you tell me it doesn't work, let me know what errors you are getting. Try this instead:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Copying cell values to different file

    I won't quote you anymore. I tried the last suggestion and it's not working either. It debugs fine, but still not copying the data over to the database file. Thank you for help on this.

  7. #7
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    Will you try my code in post 3 and let me know if that works?

  8. #8
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Copying cell values to different file

    No go on that one either. No error messages, just not copying the values over.

  9. #9
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Copying cell values to different file

    That looks to be a winner, I need to tweak it a little but it pulled the data over. Thanks for all your help.

  11. #11
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copying cell values to different file

    Sorry it took so long, I was messy. Glad it worked.

+ 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