Ask Your Question

How is a macro assigned to a dialog control event?

asked 2019-06-05 06:49:26 +0100

updated 2020-08-14 11:06:43 +0100

Alex Kemp gravatar image

Following the instructions of Pitonyak's " Macro Explained" Chapter 18 "Dialogs and Controls", I created a simple dialog with one button and tried to assign a macro (from the same library in which the dialog is defined) to mouse button up on that button. On preview, the dialog opens but clicking the button does nothing. I assigned a variety of my macros to every event of the button and none of them were triggered by anything I did to the button. Pitonyak mentions that he encountered problems assigning macros to dialog controls events under LO that he did not have under OO.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2019-06-05 07:17:18 +0100

Ratslinger gravatar image


Have a sample you can examine on this post -> How to know which CommandButton called the macro?. It is in a simple Calc file and uses push button events but will show a working sample.

edit flag offensive delete link more

answered 2019-06-05 16:44:10 +0100

This was a dumb question-- the result of working too late. I was going to delete it but that would be unfair to Ratslinger, who took the time to answer. The problem was that the dialog preview only shows what the dialog will look like and does not invoke event actions. When the dialog is launched directly, macros assigned to controls' events work.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-05 06:49:26 +0100

Seen: 244 times

Last updated: Jun 05 '19