LibreOffice Calc form controls

I inserted a text box to sheet 1 and try to modify it programatically

Hello,
Here is access to control named TextBox1 on Sheet1:

Option Explicit
Sub display_something()
    Dim oSheet, oControl
    oSheet = ThisComponent.Sheets.getByName("Sheet1")
    oControl = oSheet.DrawPage.Forms.getByName("Form").getByName("TextBox1")
    oControl.String = "Hello"
End Sub

Here is a sample. Code is executed by the push button >
TextBox.ods (10.1 KB)