Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Capturing query table errors
How do I intercept query table errors, bypassing the Excel ones?
Here's an example of what I'm trying to do using examples from the Help files: Sub Macro2() Workbooks(1).Activate Application.DisplayAlerts = False ' This doesn't make a difference for my purposes On Error GoTo ErrorHandler Selection.QueryTable.Refresh BackgroundQuery:=False GoTo Exit_Sub ErrorHandler: Msg = "Error # " & Str(Err.Number) & " was generated by " & Err.Source & Chr(13) & Err.Description MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext Exit_Sub: On Error Resume Next Application.DisplayAlerts = True End Sub For testing I've moved the database to a different folder so the first error window is "Please Enter MS JET OLE DB Initialization Information", then my example message box. I want to COMPLETELY bypass the Windows error window and just use mine. Suggestions? |
#2
|
|||
|
|||
Oops, wrong location. Please refer to the same question in the
microsoft.public.excel.programming newsgroup. Sorry about that! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table refresh | Excel Worksheet Functions | |||
Removing errors from a Pivot table | Excel Discussion (Misc queries) | |||
Using Microsoft Query data in a pivot table. | Charts and Charting in Excel | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) | |||
How do I get a web query to auto-refresh before a pivot table aut. | Excel Discussion (Misc queries) |