+ Reply to Thread
Results 1 to 9 of 9

copy sheet and paste into sheet in closed file

  1. #1
    Registered User
    Join Date
    08-22-2010
    Location
    porto
    MS-Off Ver
    Excel 2003
    Posts
    6

    copy sheet and paste into sheet in closed file

    Good afternoon,

    Was wondering if someone could help me out with a piece of code.

    What i need to do is when closing the workbook i would like to copy the sheet called "registos",

    and paste it on the sheet "registos" in the closed workbook ... \\server\server\Dest1.xls...



    i used this piece of code to get data from the closed file in open book event and works fine ... but cant send to the closed file on close book event if i use same logic....i get out of range error...

    Please Login or Register  to view this content.


    thanks

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: copy sheet and paste into sheet in closed file

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...-workbook.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    02-15-2010
    Location
    Everett, WA
    MS-Off Ver
    All versions; most components
    Posts
    188

    Re: copy sheet and paste into sheet in closed file

    This is the basic idea:

    Please Login or Register  to view this content.
    Out of range error can occur for many reasons. Since I don't have your files, I can only guess, but my guess is the destination file is missing or the "Registos" page is not there, so cannot be deleted. If you get errors, you should really specify which line through the error; makes it much easier to troubleshoot.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: copy sheet and paste into sheet in closed file

    @glycone,

    according to the forumrules, you are not allowed to respond on a threat that has been crossposted, without notification.

  5. #5
    Forum Contributor
    Join Date
    02-15-2010
    Location
    Everett, WA
    MS-Off Ver
    All versions; most components
    Posts
    188

    Re: copy sheet and paste into sheet in closed file

    @oeldere,

    Was unaware of the cross-post. You posted your message while I was in the process of writing mine. I generally assume a poster has followed the forum rules unless I see evidence to the contrary.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: copy sheet and paste into sheet in closed file

    I just try to point you on the forumrules, so you don't get an penalty of posting.

  7. #7
    Registered User
    Join Date
    08-22-2010
    Location
    porto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: copy sheet and paste into sheet in closed file

    sorry for that i posted on both so i could get a quicker answer... i wasnt aware that i couldnt

  8. #8
    Registered User
    Join Date
    08-22-2010
    Location
    porto
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: copy sheet and paste into sheet in closed file

    gyclone thank you that helped m8

  9. #9
    Forum Contributor
    Join Date
    02-15-2010
    Location
    Everett, WA
    MS-Off Ver
    All versions; most components
    Posts
    188

    Re: copy sheet and paste into sheet in closed file

    You're welcome! Aside from the issues mentioned above, cross-posting clogs search results with multiple hits on the same question, which is very frustrating to anyone searching on the same issue. Pick the forum and forum site you think will get you the best results. Post once, post clearly, and wait for the experts there to help you. If your need is so immediate that you can't wait a day or two for an answer, consider hiring a consultant who has the necessary expertise.

+ 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. Copy / Paste Values Only one sheet into another file from a multi sheet excel file
    By srisri201012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2013, 12:56 PM
  2. Referencing original sheet to copy/paste into new sheet without using file name
    By pgarakani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2012, 02:06 PM
  3. Macro to copy over and paste data in to a work sheet from a closed workbook
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2009, 04:04 AM
  4. Macro to copy sheet from closed work book and overwrite if sheet already exists
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-23-2009, 06:36 PM
  5. Replies: 1
    Last Post: 01-04-2005, 06:06 PM

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