"ON ERROR GOTO"

E

Ed

Krappo,

What you need to do is seperate the 2 Open calls into
different procedures. Something like this:

Sub openBook2()

On Error Goto AAA
Workbooks.Open Filename:="C:\dir\dir\book2.xls"
Exit Sub

AAA:
MsgBox "Book2 not Found"
openBook3

End Sub

Sub openBook3()

On Error Goto BBB
Workbooks.Open Filename:="C:\dir\dir\book3.xls"
Exit Sub

BBB:
MsgBox "Book3 not Found"

End Sub

I don't under your second question: "write a ***msgbox so
that it display as I type (line by line in one single
message)."
 
D

Dan E

Krappo,

MsgBox Prompt:="The book you've requested no found." & _
vbCrLf & "Either you have missplaced the book" & _
vbCrLf & "or such book is not present."

the vbcrlf is carriage return line feed (ie enter)

Dan E
 
K

Krappo

Thanks Dan E,

That was wonderfull! I appreciate your help and I really looking for
that solutions.

Thanks to both of you, Ed who have settled my first question and to
you for the second questions.

Best wish to both of you.
Krappo.
 

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

Top