Hello Community,
ist there a way to react in a VBA-Userform if an object is selectd in the document.
I want to read a few field from Objectdata and show these in a textbox.
Thanks in advance!
Hi there. Someone with more experience may have a better solution but I use formName.Repaint (where formName is the name of your VBA_Userform). So feed the data back to your Userform and then use the Repaint command to refresh it.
I hope this helps.
Thank you for the help. This is not what i want.
I want to react on events out of my Form, f.e. if s.o. select an object in the document.I think it is also pssoible with an Timer trigger. But i don't know if this is possible.
Best regards.
Yes there is a SelectionChange Event. You can find an example of how to use it in a docker here. Custom Dockers in CorelDRAW, Corel DESIGNER and Corel PHOTO-PAINT
You will also see a list of other events:
If you want an example of how to do this with a UserForm you may watch the following video:Selection change event, update size in textbox in a custom macro in CorelDraw, tutorial.
Hope that helps,
-Shelby
Thank you Shelby,
That is to heavy for me...Is it possible that you post a little vba code which will do that?Thanks in advance!