Hi
Sub NameSheet(myoldName as String, myNewName as String)
Activeworkbook.Worksheets(myOldString).Name = myNewString
end sub
In the calling sub you would use, for example
NameSheet "Sheet1", "DataSheet"
to change Sheet1 to DataSheet.
Be careful with illegal characters in the sheet name like /, \, ?, :,
[, ] and * or they will generate an error.
regards
Paul