From the code:
ThisComponent.getCurrentController.getActiveSheet
How can I delete this active sheet ?
And if the active sheet was locked, how can I delete this locked active sheet ?
From the code:
ThisComponent.getCurrentController.getActiveSheet
How can I delete this active sheet ?
And if the active sheet was locked, how can I delete this locked active sheet ?
Sub RemoveByNamePlanS ( X As String)
'================================================|
thisComponent.getSheets.RemoveByName( X )
End Sub
Hello @lonk
Example:
oSheet = ThisComponent.getCurrentController.getActiveSheet
sName = oSheet.Name
ThisComponent.Sheets.removeByName(sName)
Deletes sheets with isProtected = True
property as well.
One-lined code
ThisComponent.Sheets.removeByName(ThisComponent.getCurrentController.getActiveSheet.Name)