View Single Post
 
Old 11-25-2016, 06:48 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Use the VBA code name of the sheet so you will always be dealing with the same sheet no matter what the current tab name is.
Code:
Dim DestSh As String

DestSh = "The_New_Name"

With Sheet1     '<~~~~ the sheet's code name
    .UsedRange.ClearContents
    .Name = DestSh
End With
Reply With Quote