ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to prevent a VB dialogue box appear (https://www.excelbanter.com/excel-programming/394954-how-prevent-vbulletin-dialogue-box-appear.html)

Gunilla G[_2_]

How to prevent a VB dialogue box appear
 
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


John Bundy

How to prevent a VB dialogue box appear
 
Hard to tell without code (for me anyway) try one of these before error and
turn back on after handling
application.DisplayAlerts=False
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Gunilla G" wrote:

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


Tom Ogilvy

How to prevent a VB dialogue box appear
 
In the vbe go to tools=Options and under the General tab make sure you have
something other than Break on All Errors selected.

--
Regards,
Tom Ogilvy


"Gunilla G" wrote:

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


Gunilla G[_2_]

How to prevent a VB dialogue box appear
 
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.

"John Bundy" wrote:

Hard to tell without code (for me anyway) try one of these before error and
turn back on after handling
application.DisplayAlerts=False
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Gunilla G" wrote:

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


Gunilla G[_2_]

How to prevent a VB dialogue box appear
 
Breake on Unhandle errors is checked.
Thanks Gunilla

"Tom Ogilvy" wrote:

In the vbe go to tools=Options and under the General tab make sure you have
something other than Break on All Errors selected.

--
Regards,
Tom Ogilvy


"Gunilla G" wrote:

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



All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com