![Quote](images/misc/quote_icon.png)
Originally Posted by
SamT
Lists all sheets. Sorts Listing alphabetically. Activates selected sheet. Always stay next to active sheet.
Copy TOC sheet to any workbook. Use Rows 1 to 3 for notes/info/instructions
Hi,
I have made few modifications in the code as per my requirement. Request your help in the following areas where my knowledge is limited as a beginner to VBA.
(1) I have added serial number before the sheet names. But my code is skipping 1 number where the TOC sheet is moving
TOC.Cells(r, 2).Value = i
(2) Can i move to the sheet even if i click on column D
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.ScreenUpdating = False
''''Check criteria for running this sub
'Is only one Cell selected
If Target.Count <> 1 Then Exit Sub
'Is there a List
If LastRow < 3 Then Exit Sub
'Is the selection in the List
If Intersect(Target, Range("C3:C" & CStr(LastRow))) Is Nothing Then Exit Sub
''''Move the Index Sheet, Activate the chosen Sheet, and Select "A1" _
on the chosen Sheet.
TOC.Move Before:=Sheets(Target.Value)
Sheets(Target.Value).Activate
ActiveSheet.Range("A1").Select
Application.ScreenUpdating = True
End Sub
Thanks in advance
Unable to attach the file