cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Popup dialog by changing MetaAttribute

RandyB
MEGA Partner
MEGA Partner

Hello, 

 

I have the requirement that a popup should be displayed if a user changes an attribute value (for example: Status from "active" to "inactive"). If the user changes the status to inactive a popup should be displayed. 

 

The Popup should have a "OK" and "Cancel" button.

  • If the user selects "OK" some depending objects will be set to inactive by a macro.
  • If the user selects "Cancel" the attribute value should be set to "active" again

 

I created a MetaAttributeUpdateTool and it prints a MsgBox by changing the value. So I know this works.

 

Problem right know:

  • How can I create a Popup with two buttons and a text information? "OK" and "Cancel" button
  • How can I connect my code with the buttons?
  • How can I reset set attribute value if the user select "cancel"? 

Would be great to provide me some code examples or pseudo code for estimating the time I will need to implement it. 

 

Thank you in advance, 

Randy

 

1 Reply

lionel
MEGA
MEGA

Hi Randy,

try this :

answer=msgbox("Do you really want to set this to 'Inactive' ?",1)
if answer = 2 Then 'If cancel was pressed
  <code to reset attribute...>
end if