+ Reply to Thread
Results 1 to 8 of 8

Macro to copy and paste files files as value

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    India.Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    97

    Macro to copy and paste files files as value

    Hi ,

    I have couple of files in a folder each file contains only one sheet . I am looking for a macro which will open each file and copy paste data as values then save and close file.

    Thank you

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro to copy and paste files files as value

    You will need to provide the ile path and names of the workbooks.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    09-25-2015
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    2013, 2010
    Posts
    20

    Re: Macro to copy and paste files files as value

    Let try this code:
    Please Login or Register  to view this content.
    assume that you have all your workbook in drive "D", once you run the code it will ask you to select a folder that contain all workbooks you want to copy and paste value. Once you select a folders all workbooks in that folder will be open, copy paste value, close and save.

    remember that make sure only workbooks that you want to paste value that you can keep in that folder, and please do not include other than workbook because it can generate error.

    please let me know if it doesn't work with you.

  4. #4
    Registered User
    Join Date
    08-03-2012
    Location
    India.Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Macro to copy and paste files files as value

    Thank you for the code ... it is opening file copying data but not pasting as values .
    Opens ,copies data and save file.

  5. #5
    Registered User
    Join Date
    08-03-2012
    Location
    India.Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Macro to copy and paste files files as value

    Hi ,

    Its not saving file ...

  6. #6
    Registered User
    Join Date
    09-25-2015
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    2013, 2010
    Posts
    20

    Re: Macro to copy and paste files files as value

    hi Sharadharani, sorry for late to reply you because i was busy and get no time to come here. Actually i confused to say false and it is suppose to say true here:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-03-2012
    Location
    India.Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    97

    Re: Macro to copy and paste files files as value

    Thank you So much Kroko ... Its working perfect now

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Macro to copy and paste files files as value

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] Macro to Copy and paste folders and subfolders without files in it
    By Madhut in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2016, 01:47 PM
  2. Replies: 0
    Last Post: 04-13-2013, 10:45 AM
  3. Copy and Paste Macro between excel files
    By Rouler in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2012, 10:43 AM
  4. Macro to open, copy/paste, and close files with variable name
    By mjr33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2011, 10:20 PM
  5. Macro - open files, copy & paste values
    By aron.silan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2010, 09:24 AM
  6. A Macro to open 2 linked files copy 3rd files Input sheet
    By barrha0b in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2010, 09:53 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