XLA routines: EE_SheetName

Nick's picture
EE_SheetName returns the sheet name...
Public Function EE_SheetName(Optional ws As Worksheet)
' returns the sheet name
' can be used on a worksheet as a function or called
'http://excelexperts.com/xla-routines-eeSheetName    for updates on this function

    If ws Is Nothing Then
        EE_SheetName = ActiveSheet.Cells(1).Parent.Name
    Else
        EE_SheetName = ws.Name
    End If
 
End Function