+ Reply to Thread
Results 1 to 7 of 7

Copy paste worksheet range to existing workbook

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    wisconsin
    MS-Off Ver
    excel 2010
    Posts
    9

    Copy paste worksheet range to existing workbook

    how do i go about creating a macro to copy a range in sheet 1 in workbook A and paste that to a new tab(the last one) in the existing workbook B. i would like the tab to be renamed based on a cell value. preferably workbook B doesnt have to be open, and the save and close it

    thanks for the help

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Copy paste worksheet range to existing workbook

    maybe this
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    01-17-2014
    Location
    wisconsin
    MS-Off Ver
    excel 2010
    Posts
    9

    Re: Copy paste worksheet range to existing workbook

    so i solved my problem with your help, thanks much john. here is the code i used, i also added a sub to remove the macro buttons from the copied sheet. thanks again.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Copy paste worksheet range to existing workbook

    You're welcome! Glad you solved it!
    If you are happy with the solution, please mark the thread as "Solved". thx!

  5. #5
    Registered User
    Join Date
    01-17-2014
    Location
    wisconsin
    MS-Off Ver
    excel 2010
    Posts
    9

    Re: Copy paste worksheet range to existing workbook

    on second thought i thought i solved it...now it keeps giving me an error that says "the object invoked has disconected from its clients"...i have no idea how or why it happens. i can do the copy/save one time, but if i try it again it produces that error. any ideas?

  6. #6
    Registered User
    Join Date
    01-17-2014
    Location
    wisconsin
    MS-Off Ver
    excel 2010
    Posts
    9

    Re: Copy paste worksheet range to existing workbook

    well the problem was coming from
    Please Login or Register  to view this content.
    i wish i could figure it out so i wouldnt have to rename each on each time. i would like the tab be the date, but if i use format(now, yy-mm-dd) it produces an error since i cant have two of the same day

  7. #7
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Copy paste worksheet range to existing workbook

    not sure, but check if that sheet exists, if yes, delete it and yr code will go on...

+ 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. Download Excel Workbook from IE copy and paste into existing Workbook
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-16-2013, 03:13 PM
  2. Replies: 11
    Last Post: 11-04-2013, 04:32 PM
  3. Replies: 3
    Last Post: 10-14-2013, 03:06 PM
  4. Copy worksheet from closed workbook into active/existing workbook.
    By rasikvekaria in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 06:55 AM
  5. Replies: 1
    Last Post: 10-17-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