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
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
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!
Let try this code:
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.Please Login or Register to view this content.
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.
Thank you for the code ... it is opening file copying data but not pasting as values .
Opens ,copies data and save file.
Hi ,
Its not saving file ...
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.
Thank you So much Kroko ... Its working perfect now
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks