hello
it all began when i wanted to create udf that would tell me wheter a worksheet exists.
[VBA]Function sheetme(shtname) As Boolean
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.name = shtname Then
sheetme = True
End If
Next
End Function
[/VBA]
then i found that my founction could not deal with charts.so i added another udf to tell me wheter i look at a worksheet or a chart sheet
[VBA]
Function prototype(shtname) As String
prototype = TypeName(shtname)
End Function
[/VBA]
can any one tell me what wrong with my functions?.