@MascaYemas, Esta macro devuelve el nombre de la hoja de trabajo en la celda activa.
Si alguien sabe cómo transformarlo en una función …
Sub ActivePlan()
Dim oPlan As Object
oPlan = ThisComponent.getCurrentController.getActiveSheet()
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "StringName" : args1(0).Value = oPlan.getName()
CreateUnoService("com.sun.star.frame.DispatchHelper") _
.executeDispatch(ThisComponent.CurrentController.Frame, ".uno:EnterString", "", 0, args1())
End Sub
ATTENTION: If you would like to give more details to your question, use edit in question or add a comment below. Thank you.
If the answer met your need, please click on the ball to the left of the answer, to finish the question.