Instead of a macro button for each sheet why not just use a double_click
event such as the one I use for my menu sheet. Right click sheet tabview
codecopy/paste this. Then, simply double click on the sheet name typed in
cells in col A (or, as written, anywhere on the sheet). BTW, if you sort
sheets are set up the same you could sort any sheet from the menu sheet
without going to the individual sheets. Perhaps you don't need 100 sheets???
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(ActiveCell.Value) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Application.Goto Sheets(ActiveCell.Value).Range("a4")
End If
Application.DisplayAlerts = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"vcff" wrote in message
...
I had a workbook with 100 worksheets. As this is a big workbook, in order
for
me to get to the correct worksheet, I had created 4 menus which were
placed
in such an order that at all times, I will be able to see one menu when
working in this workbook. Menu1 is the worksheet which I list or amend the
title of the 100 worksheets while the other 3 menus will created by using
the
"=" sign.
In menu1, column A is the 100 worksheets title.
Under column B, I had created a macro button for each of the 100
worksheets.
eg A1 Expenses B1 (a macro button which will bring me to the correct
worksheet)
When I do a sorting under menu1 by selecting column A & B, I had a problem
on the other 3 menus. The macro buttons under column B does not follow
column
A during the sorting.
eg I am in menu3
A1 address but B1 button will direct me to the expenses worksheet
Pls help
tnks