Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
check to see if sheet exists
Is there anyway to see if a sheet of a given name exists.
I want to write and if statement: if Sheet("rev date") *does exist* Then true condition Else false condition End If I there a way to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
check to see if sheet exists
Here's a function
'----------------------------------------------------------------- Function SheetExists(Sh As String, _ Optional wb As Workbook) As Boolean '----------------------------------------------------------------- Dim oWs As Worksheet If wb Is Nothing Then Set wb = ActiveWorkbook On Error Resume Next SheetExists = CBool(Not wb.Worksheets(Sh) Is Nothing) On Error GoTo 0 End Function -- HTH RP "Wandering Mage" wrote in message ... Is there anyway to see if a sheet of a given name exists. I want to write and if statement: if Sheet("rev date") *does exist* Then true condition Else false condition End If I there a way to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to check to see if a sheet with a particular name exists? | Excel Worksheet Functions | |||
check if sheet exists | Excel Discussion (Misc queries) | |||
check if the sheet/tag exists | Excel Worksheet Functions | |||
Check to see if sheet exists | Excel Programming | |||
check if sheet exists | Excel Programming |