ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can a combo box activate different macros (https://www.excelbanter.com/excel-discussion-misc-queries/92192-can-combo-box-activate-different-macros.html)

Carrie

Can a combo box activate different macros
 
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 :)

ExcelGord

Can a combo box activate different macros
 
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.

"

"Carrie" wrote:

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 :)



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

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