Tab Hound

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Depending on what you want to do it is quite easy to program your navigation aids, I very quickly created this very basic navigation tool. :
I created a Userform (Userform1) on it I put a listbox (Listbox1) and a command button (commandButton1)
then in a standard module I had this code which is triggered by putting a shortcut on the Excel Quickaccess toolbar. This shows the userfrom.

VBA Code:
Sub showu()
 UserForm1.Show
End Sub
then the code on the userform was:
VBA Code:
Private Sub CommandButton1_Click()
For i = 1 To Worksheets.Count
    If UserForm1.ListBox1.Selected(i - 1) = True Then
      Worksheets(i).Select
      Exit For
    End If
Next i
Unload UserForm1
End Sub

Private Sub UserForm_Activate()
 With UserForm1.ListBox1
For i = 1 To Worksheets.Count
    .AddItem Worksheets(i).Name
Next i
End With
End Sub
I changed the caption on the command button to "GO"
 
Upvote 0
I have just been playing with these and if you want the worksheets listed inthe reverse order you can do it like this:#
VBA Code:
Private Sub CommandButton1_Click()
For i = 1 To Worksheets.Count
    If UserForm1.ListBox1.Selected(i - 1) = True Then
      shtno = Worksheets.Count - i + 1
      Worksheets(shtno).Select
      Exit For
    End If
Next i
Unload UserForm1
End Sub

Private Sub UserForm_Activate()
 With UserForm1.ListBox1
For i = Worksheets.Count To 1 Step -1
    .AddItem Worksheets(i).Name
Next i
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,368
Messages
6,171,682
Members
452,416
Latest member
johnog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top