View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
SCSA25[_3_] SCSA25[_3_] is offline
external usenet poster
 
Posts: 1
Default add sheet if statement


Function SheetExists(SheetName As String) As Boolean
' returns TRUE if the sheet exists in the active workbook
SheetExists = False
On Error GoTo NoSuchSheet
If Len(Sheets(SheetName).Name) 0 Then
SheetExists = True
Exit Function
End If
NoSuchSheet:
End Functio

--
SCSA2
-----------------------------------------------------------------------
SCSA25's Profile: http://www.excelforum.com/member.php...fo&userid=1510
View this thread: http://www.excelforum.com/showthread.php?threadid=26740