Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does the sheet exist?
I need the syntax for checking that a given sheet exist identified by it's
CODE name. Is anybody game? The Doctor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does the sheet exist?
Something like this will do it:
Function TestForSheet(lSheetNumber As Long) As Boolean Dim strSheetName As String On Error Resume Next strSheetName = Sheets(lSheetNumber).Name If Err.Number = 0 Then TestForSheet = True Else TestForSheet = False End If On Error GoTo 0 End Function Sub test() MsgBox TestForSheet(100) End Sub RBS "Dr.Schwartz" wrote in message ... I need the syntax for checking that a given sheet exist identified by it's CODE name. Is anybody game? The Doctor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want a trace a same values exist in two different sheet | Excel Worksheet Functions | |||
VBA: Make a new sheet if it doesn't exist | Excel Discussion (Misc queries) | |||
VBA, Make a new sheet if it doesn't exist | Excel Discussion (Misc queries) | |||
test if a sheet exist (with the name) ? | Excel Programming | |||
Does sheet exist? | Excel Programming |