Code for OptionButton displaying new frame

P

porky2j

Hi all!

I have a user form with several frames containing optionbuttons. I
want frame 4 to only be displayed if certain OptionButtons in Frame 1
are selected. If they are not selected I want Frame 4 to remain
hidden.

Is there a way to do this?

Thanks in advance
Paul
 
S

Susan

in your userform_initialization code, make frame4.visible=false

then on each of the option buttons that you want it to become visible,
use the click event:

private sub opt1_click()
frame4.visible=true
end sub

if you need to re-use the userform, make sure you call the
initialization code again to reset it & make frame4 invisible once
more.
hope this helps
susan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top