How to prevent a VB dialogue box appear

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

Guest

I have an
on Error go to Handler
xxxx
exit sub
Handler:
msgbox "Database not available"
end sub
It works but a Microsoft Visual Basic dialogue box opens with Run-time error
3709
I don't want that to happen. What am I doing wrong?
Gunilla G
 
Hard to tell without code (for me anyway) try one of these before error and
turn back on after handling
application.DisplayAlerts=False
 
In the vbe go to tools=>Options and under the General tab make sure you have
something other than Break on All Errors selected.
 
The code is to open up an Access database. Sometimes the access to the server
is down and the error message will tell the user that the path can not be
found and ther is a button for END and one for DEBUG. Instead I want my
msgbox "Database..." show. It works fine but the VB Dialogue box opens up
and it did not work with Application.DisplayAlerts=False. Is there a way to
just enable just the END button? That would work too. I am working in Excel
2000.
 

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