NEW

Macro Sheets Only

Equivalent to choosing the New command from the File menu. Creates a new Microsoft Excel workbook or opens a template.

Syntax

NEW(type_num, xy_series, add_logical)
NEW?
(type_num, xy_series, add_logical)

Type_num specifies the type of workbook to create, as shown in the following table. Type_num is most often 5 or quoted text; other values are mainly for compatibility with Microsoft Excel version 4.

Type_num Workbook

Omitted New workbook with a single worksheet of the same type as the active worksheet

1 New workbook with one worksheet

2 New workbook with one chart based on the current selection

3 New workbook with one macro sheet

4 New workbook with one international macro sheet

5 New workbook with 16 worksheets or based on the default workbook

6 New workbook with one Visual Basic module

7 New workbook with one dialog sheet

Quoted text Template.

Xy_series is a number from 0 to 3 that specifies how data is arranged in a chart.

Xy_series Result

0 Displays a dialog box if the selection is ambiguous.

1 or omitted The first row/column is the first data series.

2 The first row/column contains the category (x) axis labels.

3 The first row/column contains the x-values; the created chart is an xy (scatter) chart.

Add_logical specifies whether or not to add the sheet type to the open workbook. If add_logical is TRUE, the sheet type is inserted before the current sheet; if FALSE or omitted, it is not inserted. This argument is for compatibility with Microsoft Excel version 4.0.

Add_logical is ignored if type_num is 5.

Remarks

You can also use NEW to create new sheets from templates that exist in the startup directory or folder, using for type_num the text that appears in the File New list box. To create new sheets from any template that is not in the start-up directory, use the OPEN function.

Related Functions

NEW.WINDOW Creates a new window for an existing worksheet or macro sheet

OPEN Opens a workbook

List of Command-Equivalent Functions