From the course: Excel VBA: Managing Files and Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Move a worksheet to an existing workbook - Microsoft Excel Tutorial
From the course: Excel VBA: Managing Files and Data
Move a worksheet to an existing workbook
- [Instructor] In the previous movie, I showed you how to move, that is cut and paste, a worksheet from one workbook to a new workbook. In this movie, I will show you how to move a worksheet to an existing workbook. My sample file is 0308 move to existing, and that's a macro enabled workbook you can find in the chapter three folder of the exercise files collection. This workbook contains three worksheets, and I won't work with any of their data. So I'll just press alt F11 to move to the visual basic editor. And here I have two procedures, a sub-routine at the top and a function at the bottom. I'll take a look at the function first because it's used as part of the sub-routine. So this function is called check if open and it accepts a file name as a string and it returns this output as a Boolean variable. So that means it is either true or false. It can only take on one of two values. The code is very clever, and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Check if a worksheet exists5m 11s
-
Create and rename worksheets5m 28s
-
(Locked)
Copy a worksheet within the active workbook4m 20s
-
(Locked)
Copy a worksheet to a new workbook3m 58s
-
(Locked)
Copy a worksheet to an existing workbook5m 47s
-
Move a worksheet within the active workbook3m 15s
-
(Locked)
Move a worksheet to a new workbook4m 41s
-
(Locked)
Move a worksheet to an existing workbook6m 24s
-
(Locked)
-
-
-
-
-