custom error message

F

Fan924

I am getting runtime error 1004 when I run a macro and.... the
imported file is to big. The error is expected.

My question, can I replace this error message with something else?
Something instructive?
 
D

Dave Peterson

On error resume next
'your line of code that may cause the error
if err.number <> then
err.clear
msgbox "some error just took place!"
end if
on error goto 0
 
B

BillyBob

Um, what do you think? Out of curiosity, what "instructive" message did you
have in mind?

BillyBob
 
E

eliano

Um, what do you think?  Out of curiosity, what "instructive" message did you
have in mind?

BillyBob







- Mostra testo citato -

Could be that this is a new technique? :))
Eliano
 
N

norie

If the error is expected why don't you do something to avoid it?

Check the size of the file perhaps?

Too big - don't continue, right size - continue.

Norie
 

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