I have a number in Cell M4. I am copying the sheet and renaming it to the value in M4. I also want to open the copy and open it at Cell A1. I have this code so far but unsure about the rest.
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("M4").Value <> "" Then
ActiveSheet.Name = wh.Range("M4").Value
End If
wh.Activate
Range ("A1")
End Sub
Hope you can help.
regards Ged
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("M4").Value <> "" Then
ActiveSheet.Name = wh.Range("M4").Value
End If
wh.Activate
Range ("A1")
End Sub
Hope you can help.
regards Ged