I need a macro that check if a sheet exists by its index instead of its name
oSheets = ThisComponent.Sheets()
If oSheets.hasByName(“Invoice”) Then
Instead I need something like this (that obviously doesn’t work):
If oSheets.hasByIndex(2) Then
Anyone can help me?