Go to a chosen worksheet

B

Bob

I am trying to create a simple index page as the first sheet in
workbook.

The book has over 20 worksheets in it. On sheet1 I would like to have
a dropdown (ComboBox) for people to select the worksheet that they
want to go to and then a control button for them to click which will
then take them to the selected worksheet.

Each worksheet is known as “sales” ,“stock” etc it is these names I
have put into the ComboBox, each worksheet has its known name quoted
in cell A4 ie “Sales” is sheet7 and in cell A4 of sheet7 there is the
word “Sales”. The same applies for all worksheets..

Is the above the best way to go with this where the name in the
ComboBox matches a known cell on each worksheet and by clicking on the
command button you go straight to that worksheet. (if so how) or is
there a better way to select and then go to a chosen worksheet.

With thanks

RJG
 
J

Jacob Skaria

In design mode double click the command button and paste the below 1 line code

Private Sub CommandButton1_Click()
Sheets(ComboBox1.Value).Activate
End Sub

If this post helps click Yes
 

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