I have been working on this for a while with no success. Originally we were looking for the active worksheet to move to the end so i got this code below to do exactly that. Now I dont need the active sheet to move to the end but need the target address worksheet to move to the beginning
Note: the active sheet is sheet 1
Any ideas how to get this to work.
[Private Sub Worksheet_Change(ByVal Target As Range)
Dim iLoop As Integer
If Target.Address = "$C$17" Then
If Target.Value < Worksheets.Count And Target.Value >= 1 Then
'inivisible all sheets
For iLoop = 2 To Worksheets.Count
Worksheets(iLoop).Visible = True
Next
Worksheets(Target.Value + 1).Visible = True
Worksheets.Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Range("C1").Value
ActiveSheet.Move after:=Worksheets(Worksheets.Count)
End If
End If
End Sub]
Bookmarks