ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   display hidden controls once check box activated (https://www.excelbanter.com/excel-programming/396372-display-hidden-controls-once-check-box-activated.html)

gbpg

display hidden controls once check box activated
 
I want users to answer a yes no question and if they choose yes the following
controls that are on my form (but not visible) to appear. So the sequence
would be:
when click button
display ListBox4,Label12,CommandButton10, CommandButton11

Any quick solutions?

JW[_2_]

display hidden controls once check box activated
 
On the Click event of the button, place something like this for each
item you want to display.
Me.ListBix4.Visible = True

You might want to do a check so that clicking the button when they are
not visible will make them visible. Clicking them when they are
visible will make then invisible.
If Me.ListBox4.Visible = True Then
Me.Listbox4.Visible = False
Me.Label12.Visible = False
Me.CommandButton10.Visible = False
Me.CommandButton11.Visible = False
Else
Me.Listbox4.Visible = True
Me.Label12.Visible = True
Me.CommandButton10.Visible = True
Me.CommandButton11.Visible = True
End If
gbpg wrote:
I want users to answer a yes no question and if they choose yes the following
controls that are on my form (but not visible) to appear. So the sequence
would be:
when click button
display ListBox4,Label12,CommandButton10, CommandButton11

Any quick solutions?



Tom Ogilvy

display hidden controls once check box activated
 
Private Sub commandbutton1_Click()
me.ListBox4.Visible = True
me.,Label12.Visible = True
me.CommandButton10.visible = True
Me.CommandButton11.visible = true
end Sub

--
Regards,
Tom Ogilvy

"gbpg" wrote:

I want users to answer a yes no question and if they choose yes the following
controls that are on my form (but not visible) to appear. So the sequence
would be:
when click button
display ListBox4,Label12,CommandButton10, CommandButton11

Any quick solutions?



All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com