I would like to create an user-defined
function in Excel
that can return the current worksheet. I could use the
sheetname = Activ
You can use below code to get the Active Sheet name and change it to yours preferred name.
Sub ChangeSheetName()
Dim shName As String
Dim currentName As String
currentName = ActiveSheet.Name
shName = InputBox("What name you want to give for your sheet")
ThisWorkbook.Sheets(currentName).Name = shName
End Sub