Go to a chosen worksheet

  • Thread starter Thread starter Bob
  • Start date Start date
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
 
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
 
Back
Top