View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
vumian[_23_] vumian[_23_] is offline
external usenet poster
 
Posts: 1
Default How to popup msgbox in this


it's has a little problem

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


sub abc()
if gbIsWBOpen("filename.doc")=true then
do function
else
msgbox "error"
end if



What's wrong with this sub abc() ???

thanks your help.


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=565232