Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Enable/Disable Button

Hi,

I am trying to disable a button when clicked and enable it when another button is clicked.

I am using the ffg code in my macro.

set buttonOn = ActiveDocument.GetSheetObject("BU04")

          set b1 = buttonOn.GetProperties

          set buttonOff = ActiveDocument.GetSheetObject("BU05")

          set b2 = buttonOff.GetProperties

           b2.Enable = 1

           b1.Enable = 0

           buttonOn.SetProperties b1

           buttonOff.SetProperties b2

This does not work.

Kind Regards

Razak

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

Hi,

You don't need a macro. Just actions and enable condition.

Use actions to set a variable. ( Actions - External Action -> Set Variable)

Then, use this variable in the enable condition of the button (button properties -> general tab)

I used this in the attachment.

Regards,

Erich

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Instead of do a trick like have two buttons in same place.

     1. with actions(enabled state)

     2.without actions(disabled state)

     On clicking the button enable/Disable show and hide the buttons.

Celambarasan

erichshiino
Partner - Master
Partner - Master

Hi,

You don't need a macro. Just actions and enable condition.

Use actions to set a variable. ( Actions - External Action -> Set Variable)

Then, use this variable in the enable condition of the button (button properties -> general tab)

I used this in the attachment.

Regards,

Erich

Anonymous
Not applicable
Author

Thanks It Works!!!

Not applicable
Author

Hi,

I think you can do that without using a macro. In the trigger of the Button you can set a variable.

1. Create a Variable with the value 0

2. Then in your button create the trigger wich will set this variable to  1

3. And in the tab "layout" you set a condition to enable the button when the variable = 0.

4. In your second button create another trigger wich will set the variable to 0

5. And in the tab layout set a condition to enable the button when the variable = 1

Regards,

Pauline