Change text in Form using macro

Sup, I was wondering if theres a way that I could change a Text Control through a macro, like get the Text using mainform.getByName("TXTcontrol") and then do something like TXTcontrol.text = "testing" and then it would change the text to testing inside the form, just like it works with text or combo boxes.

Yes, It is posible.
Better if you bring a little example to do something.
Bye!

@samuel_ribeiro : You are writing about “Text Control” and then about “Text” (where it is working).
Did you test mainform.getByName("TXTcontrol").Text = "testing" ?

yes I did, but I think my explanation was misleading, because I’m talking about labels, in my LO in pt-br, it is called “etiquetas”, but the literal translation is label. This is the function I want to change using macros:
image
Or this icon if you’re using the default theme:
image

It creates texts like this:
image
And I would like to change the text, in this example “hey guys”, to another text.

So it is, as you mentioned:

mainform.getByName("TXTcontrol").Label = "testing"
1 Like