+ Reply to Thread
Results 1 to 5 of 5

paste to another work book in next row

  1. #1
    Registered User
    Join Date
    10-02-2019
    Location
    leicester , england
    MS-Off Ver
    13
    Posts
    39

    paste to another work book in next row

    Please can someone look at my code.
    It seems to be doing all the write things but doesn't paste.
    The code Adds a load of data to a sheet, then copy's this data , opens a new workbook and should past in the next row down offset by 1,1.
    But nothing pastes in ?
    Code attached.

    The code adds the data to the sheet fine -checked
    It also selects the correct line to copy -
    It opens the workbook-finds the correct sheet -highlights the correct row. But then nothing. Saves and closes

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: paste to another work book in next row

    .
    I temporarily edited the code so it could be tested here (since your workbooks are not available for testing here).
    This is what I was working with :

    Please Login or Register  to view this content.
    Commenting out some of the code allowed me to test the "copy and paste" aspects of the code. It works fine here.

    Perhaps you need to focus on the ", WriteResPassword:="QualityClinic"" command.

    I did not do any testing on it here, but it would appear that is the only thing left to confirm. Is the password correct ?
    Does it need a password prior to pasting ? Have you utilized the correct syntax for providing the password ?

    See attache workbooks.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-02-2019
    Location
    leicester , england
    MS-Off Ver
    13
    Posts
    39

    Re: paste to another work book in next row

    Took the password off, still no difference.

    The sheet is not protected either.

    Quote Originally Posted by Logit View Post
    .
    I temporarily edited the code so it could be tested here (since your workbooks are not available for testing here).
    This is what I was working with :

    Please Login or Register  to view this content.
    Commenting out some of the code allowed me to test the "copy and paste" aspects of the code. It works fine here.

    Perhaps you need to focus on the ", WriteResPassword:="QualityClinic"" command.

    I did not do any testing on it here, but it would appear that is the only thing left to confirm. Is the password correct ?
    Does it need a password prior to pasting ? Have you utilized the correct syntax for providing the password ?

    See attache workbooks.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: paste to another work book in next row

    .
    Sent you a private message. Still waiting on your workbooks.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: paste to another work book in next row

    .
    Here is the working macro. You will need to edit the path to match your project.

    I chose not to use as many variables (replacements for object names) so you could easily see what was being referenced.

    Please Login or Register  to view this content.

    In addition there were a few commands in the UserForm_Initialize event that I eliminated.

    Please Login or Register  to view this content.
    Also, I changed the location of the combobox list. You may need to edit that as well.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Retrieve data and paste from another work book
    By rudswa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2017, 11:08 AM
  2. Current work book .xlsm convert to xlsx work book then mail
    By Vcare in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-26-2016, 09:47 AM
  3. VBA Code for populating cells from one Work Book A to another Work Book with condition
    By ray.kanata in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-22-2015, 03:46 PM
  4. Paste to new work book
    By Wouldsman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2014, 08:14 AM
  5. Replies: 2
    Last Post: 05-30-2006, 02:59 PM
  6. [SOLVED] I wish automate a cut and paste of data from one work book to ano
    By Ian Anderson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-28-2006, 03:35 AM
  7. Replies: 3
    Last Post: 09-01-2005, 04:05 AM

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