From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Copy a worksheet to a new workbook

Copy a worksheet to a new workbook - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Copy a worksheet to a new workbook

- [Narrator] One very common task that you will perform using Excel VBA is to copy a worksheet from a workbook to a new workbook. You do that so you can share data in the form of worksheets with other users without getting rid of the copy that you have in the original workbook. In this movie, I will show you how to do that. My sample file is 03_04_CopyToNew. And that's an Excel macro enabled workbook that you can find in the chapter three folder of your exercise files collection. This workbook contains three worksheets, and I won't work with any of the data in them. So I'll press Alt + F11 to move to the visual basic editor. And here I have the outline of a subroutine called copy to new. So I'll just press the down arrow twice, and I can enter in the code that I want to use. So let's say in this scenario, that I want to copy the February worksheet to a new workbook. The first thing I need to do is to select the…

Contents