View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default In Macros - compilation error


sub TestMe()
Dim oWb as WorkBook
on error resume next
set owb = Workbooks("Book3.xls")
on error goto 0
if oWB is nothing then
msgbox "not opened"
else
msgbox ("opened")
endif
end sub


Cheers,
--
AP

"Vijay Kotian" a écrit dans le
message de news: ...
To check whether the file is already open or not i got a command "Res =
IsWorkbookOpen("BOOK3.xls")" when i am running this command i get a
compilation error as "sub or function not defined". Can anybody help me.