Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bill
You can use this function in a normal module Function bIsBookOpen(ByRef szBookName As String) As Boolean ' Rob Bovey On Error Resume Next bIsBookOpen = Not (Application.Workbooks(szBookName) Is Nothing) End Function And use it like this in your code If bIsBookOpen("test.xls") Then -- Regards Ron de Bruin http://www.rondebruin.nl "Bill" wrote in message ... I have a macro that is opening and closing several workbooks for my Month End reports. One of the workbooks treats and places data slightly differently than all the other ones, and needs different formatting instructions for that data. I want to check if that specific filename is open. Is there a specific command for that??? (I could create a flag that is on or off when the file is opened or closed, and check that flag for true/false, but I wanted to know if there is a command to do this) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
set filename to <filename-date on open | Excel Worksheet Functions | |||
Check if filename exists. | Excel Programming | |||
Saving filename same as import filename | Excel Programming |