MsgBox Designer - Copy Text Box value to Clipboard

Attached is a library that contains a MsgBox Designer (feel free to use it). The start procedure is MsgBoxDialog.
What I want is to add a “Copy code to Clipboard” button. When I click on the button, the text from the txtCode multiline control should be copied to the Clipboard.
I’ve tried everything I know and everything Gemini + ChatGPT told me, but nothing works.
MsgBoxDesigner.zip (3.9 KB)

Where is your problem: get text or copy to clipboard

May I suggest google …

are my first two hits…

Please attach a document of an odf type containg your code. A replacement for the Sub you don’t yet get to work may simply tell “Here I am!”
This way a contributor can much more easily (or at all) see what you actually try to achieve than by studying files from your profile.

You can research the OpenOffice extension Basic IDE Tools