set otherwkbk = nothing
on error resume next
set otherwkbk = workbooks(othername)
on error goto 0
if otherwkbk is nothing then
'it's not already open
on error resume next
set otherwkbk = workbooks.open(otherpath & othername, readonly:=true)
on error goto 0
if otherwkbk is nothing then
'still didn't open
msgbox otherwkbk & " wasn't opened!"
end if
end if
end sub
'close this workbook when the "real" file closes????
Sub Auto_Close()
on error resume next
workbooks(othername).close savechanges:=false
End sub
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.