Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good point, George; I didn't even think about that.
-- Vasant "George Nicholson" wrote in message ... If "On Error Resume Next" is being ignored: In the VBE: ToolsOptionsGeneral. Make sure you have "Break on Unhandled errors" set, not "Break on all errors". -- George Nicholson Remove 'Junk' from return address. "Rob" wrote in message ... When I step through (or run the code of the function), I still get the error message on the second line below, where I expect it to just continue onto the next line. On Error Resume Next Set wb = Workbooks(BookName) IsOpen = Not wb Is Nothing ----- Vasant Nanavati wrote: ----- What does "none of them work for me" mean? -- Vasant "Rob" wrote in message ... I want to test if a workbook is open. I've found these suggestions, but none of them work for me. Any ideas why? Thanks Rob 'I've tried: Function IsOpen(BookName As String) As Boolean On Error Resume Next Set wb = Workbooks(BookName) IsOpen = Not wb Is Nothing End Function 'and: Function IsOpen(BookName As String) As Boolean On Error Resume Next IsOpen = Not (Application.Workbooks(BookName) Is Nothing) End Function 'and: Function IsOpen(BookName As String) As Boolean On Error Resume Next IsOpen = Len(Workbooks(BookName).Name) End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
need a function that will work using multiple work books and sheet | Excel Worksheet Functions | |||
How do I setup plain work sheet for preparing resume or timesheet | Setting up and Configuration of Excel | |||
resume.xlw | Excel Discussion (Misc queries) | |||
can I create a new resume? | Excel Discussion (Misc queries) | |||
On Error Resume Next | Excel Programming |