Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
find open workbooks
in a macro I must check if a workbook is open.
Which is the procedure???? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
find open workbooks
Hi Costas
Try this Function bIsBookOpen(ByRef szBookName As String) As Boolean ' Rob Bovey On Error Resume Next bIsBookOpen = Not (Application.Workbooks(szBookName) Is Nothing) End Function Sub File_Open_test() If bIsBookOpen("test.xls") Then MsgBox "the File is open!" Else MsgBox "the File is not open!" End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Costas" wrote in message ... in a macro I must check if a workbook is open. Which is the procedure???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When I open Excel, workbooks open automatically. How can I stop t | Excel Discussion (Misc queries) | |||
using find in 2 or 3 workbooks that are open | Excel Discussion (Misc queries) | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Workbooks.Open / .Open Text - How do you stop the .xls addition? | Excel Programming | |||
Where can I find other arguments & desc to the Workbooks.open("myfile.xls") cmd? | Excel Programming |