Can a combo box activate different macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all

I currently have a worksheet that has about 10-12 buttons on it. Each
button activates a different macro that brings the user to a different sheet
within the workbook. The sheet looks very cluttered with so many buttons on
it and I wanted to create a combo box that will allow the user to select a
worksheet name, and when the worksheet name is selected, it brings the user
to that sheet.

It doesn't matter to me if it activates the current macros that were created
for the buttons or uses some other approach. I just want to clean the
worksheet up a bit.

One caviat - I'm not a programmer. I can read a little programming, but
haven't written anything. Any and all help is very much appreciated!
Thank you!

Carrie :)
 
Hi, Carrie.
You can establish a combo box that lists the sheets with which you wish to
work.
If Sheet1 is the location for the list box, place the list of sheets in
a1:a5, for example, listing sheets Sheet1 through Sheet5.
In the properties for the list box, refer to that range for the 'list' of
choices.
Set B1 for the result. When the user selects a choice, their choice will
then appear in B1
In design mode, double click the combo box and a code page will appear for
it.
Insert code such as:
Range("b1").Select
mysheet = Selection
Sheets(mysheet).Select
Then when a user selects a sheet name it will send them to it. In the
destination sheet you can place a button with code "Sheets(Sheet1).Select" to
return you to the main sheet. If you have sheet tabs, etc turned off this
will give users the navigation you need.

"
 

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

Back
Top