Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a piece of code that extracts information from an access
database, everthing works well and I use this common file across various locations. My problem is that a "cannot connect to database" dialog box appears for a certain location. I know why this is, becase it doesn't have the relevant access database. Thats okay, I don't need it, but how could I 'ignore' this error when this error appears and continue to run the remaining piece of code? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you could try Application.DisplayAlerts = False at the beginning of your
code, and Application.DisplayAlerts = True at the end. "Sean" wrote: I have a piece of code that extracts information from an access database, everthing works well and I use this common file across various locations. My problem is that a "cannot connect to database" dialog box appears for a certain location. I know why this is, becase it doesn't have the relevant access database. Thats okay, I don't need it, but how could I 'ignore' this error when this error appears and continue to run the remaining piece of code? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nah, doesn't work
The specific message is "ODBC Microsoft Access Driver Login Failed", it gives an OK/Cancel option and I have to keep clicking Cancel to move forward Was hoping that if any error dialog message appeared just ignore and continue 'actioning' code |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can you not add: On Error Resume Next on the line before the line where the error appears and then: On Error Goto 0 (or to wherever your errors were going before) on the line after? If this works then a better solution would be to test the error value so that you only ignore the error if it is for this specific reason, then if any other error occurs an error message will still appear. Hope this helps, Sean. -- (please remember to click yes if replies you receive are helpful to you) "Sean" wrote: I have a piece of code that extracts information from an access database, everthing works well and I use this common file across various locations. My problem is that a "cannot connect to database" dialog box appears for a certain location. I know why this is, becase it doesn't have the relevant access database. Thats okay, I don't need it, but how could I 'ignore' this error when this error appears and continue to run the remaining piece of code? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Overcoming the restriction of 7 nested IFs in Excel XP. Is it possible? | Excel Worksheet Functions | |||
Overcoming Nested IF limits | Excel Discussion (Misc queries) | |||
replace VBA run-time error message with custom message | Excel Programming | |||
overcoming nested IF limitations...with VBA? | Excel Worksheet Functions | |||
overcoming zero values in line graph | Charts and Charting in Excel |