Aller au contenu principal

ExcelInsertSheet

Structure

ExcelInsertSheet(iCopyFrom,iInsertBefore)

Type

Procedure

Description

This function copies a sheet to another position.

Parameters: 2

iCopyFrom = the index of the sheet to copy.

iInsertBefore = the index of the sheet the copy should be placed before. 1 would make it the new first sheet. ExcelGetSheetCount+1 would make it the new last sheet.

Example

Try

ExcelNewFile(3,"v2003")

ShowMessage(ExcelGetSheetCount) 'shows 3

ExcelInsertSheet(1,4)

ShowMessage(ExcelGetSheetCount) 'shows 4

Except

ShowMessage(LastExceptionMessage)

End Try