XLL+ Class Library (7.0)

CXlMacros::WorkbookGetWorksheetCount

Gets the number of worksheets in the specified workbook

static int WorkbookGetWorksheetCount(
   long& count,
   LPCTSTR name_text = 0
);

Parameters

count

A reference to an integer which will be populated with the sheet count if the function succeeds.

name_text

Name_text is the name of an open workbook. If omitted, the active workbook is used.

Return Value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlMacros Class | CXlMacros Methods