Function SheetName(x) As String
Application.Volatile True
If x <= 0 Then
SheetName = "Worksheet number must be greater than 0"
Exit Function
End If
With Application.Caller.Parent.Parent
If x > .Worksheets.Count Then
SheetName = "Warning: There is no worksheet"
Else
SheetName = .Worksheets(x).Name
End If
End With
End Function
--
Haldun Alay
"EXCEL$B!!(BNEWS" <youngmanca@hotmail.com>, haber iletisinde ?unlar? yazd?:OJZtb$FYGHA.3532@TK2MSFTNGP05.phx.gbl...
here is my function
Function SheetName(x) As String '
Application.Volatile
SheetName = ActiveSheet.name
End Function '
what i want to do is to get the sheet name in in which a cell (like
=SheetName(0)) is in.
not the. name of ActiveSheet.
what should i do.
Bookmarks