Skip to main content

ExcelGetSheetByIndex

Structure

ExcelGetSheetByIndex(iIndex)

Type

Procedure

Description

This function switches the current sheet to the one indicated.

Parameters

iIndex = the index of the sheet to switch to. The sheet count starts at 1 and goes up to ExcelGetSheetCount

Example

Try
ExcelNewFile(3,"v2003")
ShowMessage(ExcelGetSheetCount) 'shows 3
ExcelGetSheetByIndex(1)
ShowMessage(ExcelGetCurrentSheetName) 'shows "Sheet1"
Except
ShowMessage(LastExceptionMessage)
End Try