Workbook.MergeWorkbook Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Merges changes from one workbook into an open workbook.

expression .MergeWorkbook(Filename)

expression A variable that represents a Workbook object.

Parameters

Name

Required/Optional

Data Type

Description

Filename

Required

Variant

The file name of the workbook that contains the changes to be merged into the open workbook.

This example merges changes from Book1.xls into the active workbook.

ActiveWorkbook.MergeWorkbook "Book1.xls"
Show: