Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto fill options button for Dates disappears- bring it back? Jugglertwo Excel Discussion (Misc queries) 0 March 19th 10 04:59 PM
Suppress dialog from regserver command mdullni1 via OfficeKB.com Excel Discussion (Misc queries) 3 April 30th 08 07:51 PM
Button for bring up chart oxicottin Excel Worksheet Functions 0 January 13th 07 01:33 AM
Button not bring up Macro I created A.S. Excel Discussion (Misc queries) 1 July 22nd 05 10:21 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM


All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"