workbookopen

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

Is this possible
If Not WorkbookIsOpen = "H:\NYCDB\NYCBG\Sales-and-Use Taxes\District of Columbia.xls" The
Workbooks.Open filename:="H:\NYCDB\NYCBG\Sales-and-Use Taxes\District of Columbia.xls
End I

Thanks
Jef
 
Hi
try the following

sub foo()
dim wbk as workbook
on error resume next
set wbk = workbooks("District of Columbia.xls")
on error goto 0
if wbk is nothing then
set wbk = workbooks.open filename:="H:\NYCDB\NYCBG\Sales-and-Use
Taxes\District of Columbia.xls"
end if
msgbox wbk.name
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top