View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default How to popup msgbox in this

Hi vumian,

To check to see if a named workbook is currently open, you could use this
function:

Public Function gbIsWBOpen(rsName As String) As Boolean
On Error Resume Next
gbIsWBOpen = Len(Workbooks(rsName).Name)
On Error GoTo 0
End Function

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]

vumian wrote:
How to check any file active or not

if window("file.abc").active = true then
do function
else
msgbox "error"
end if

what's wrong with this ?

thank you