Need to export and import a sheet from my workbook using VBA.
What’s the easier way to do it?
Export as CSV?
Export as txt?
Can I save the object (the copy/paste object) to a file and then import that object
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What about exporting into a new XLS, just containing that sheet? That would be the easiest the solution, preserving not only contents but also formatting of that sheet.
For getting some initial VBA code, just use the macro recorder and record the commands when you do this manually – “New Document”, Right-Click on sheet name, “Copy sheet to new document”, and for the import “Open existing document”, Right-Click on sheet name, “Copy sheet into existing document”.
For example, copying a sheet to a new workbook: