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