Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
bring up dialog box from command button?
Hi
I have a sheet with some command buttons on and was wondering if i can call up a dialog box with say 5 options on, which in turn open a corrospending sheet. example: a frontpage with 4 options, when 1 is selected a form pops up with 5 other options on. whn one of these is clicked a sheet is then opened. Can I do this? is it possisble? Thanks in advance for th help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
bring up dialog box from command button?
Yes it is possible and there are a couple of was to do this. The simplist is to design a form, (i simply call it frm1) and insert a frame
Then insert 4 optionbuttons in the frame. (or however many you want You don't really need the frame but it is good practice and you will need it if you ever want to expand a form to have many different options using option buttons. In the On_Click event for each OptionButton insert this cod frm1.hide 'This is the main form. This closes it so that the desktop doesn't get cluttere frm2.show ' This is the name of the form that you want to open when that particular option button is selecte You can repeat this as many times as you like on as many forms. in the situation you describe you will need to insert the code from your origional Command buttons into the On_Click events of the option buttons on the second form. eg: sub OptionButton1_Click( Sheets("Name of Sheet").activat end su hope this help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto fill options button for Dates disappears- bring it back? | Excel Discussion (Misc queries) | |||
Suppress dialog from regserver command | Excel Discussion (Misc queries) | |||
Button for bring up chart | Excel Worksheet Functions | |||
Button not bring up Macro I created | Excel Discussion (Misc queries) | |||
Command Button vs Control Button | Excel Programming |