Hide other control

Is there some way to hide another control? I have a popup menu that I want to control the visibility of other buttons, so if option A is selected, button B is hidden and button A is shown, and vice versa.


DIM bShow as boolean
if popup.text="SHOW" then bShow=True else bShow=False
cmdButton1.visible= bShow
cmdButton2.visible=NOT bShow

You can also just use a boolean to keep track of the state, change the button caption, and use the state to determine which Button Pressed code is used.