Excel Validation


Posted by Mark on May 09, 2000 8:30 AM

Is there a function or something I can use that will tell me whether a sheet exists? I need to check from a PowerBuilder OLE session and don't know much about excel functions. Thanks!



Posted by Celia on May 15, 2000 4:09 PM


Mark
Here's a function to check whether a sheet exists :-

Function SExist(sheetName As String) As Boolean
Dim S As Object
For Each S In Sheets
If UCase(S.Name) = UCase(sheetName) Then
SExist = True
Exit Function
End If
Next
End Function

Celia