Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error handler causes access to not responding

Status
Not open for further replies.

davyre

Programmer
Oct 3, 2012
197
AU
Hi,

I have this code:
Code:
On Error GoTo errHandler
---
exporting to Excel
---
Exit_Sub:
Set rst = Nothing
Set objSheet = Nothing
Set objBook = Nothing
Set objExcel = Nothing
Exit Function

errHandler:
Resume Exit_Sub

end function

so basically in this code, I am trying to create a report in Excel file. The error handler is supposed to handle error when a dialogbox came up asking the location the Excel file will be saved, and if user clicks Cancel in the dialog box, it wont show anything so user will not be confused. This is what user will get if I dont use error handler

dxeaom.png


can someone tell me what is wrong with my error handler?
*rst is a DAO.Recordset
 
1. Wrong forum: you need forum705
2. I do not see anything in your code that does anything other than basic cleanup. Your Error handler does nothing. Yet you say the error handler is causing it.

So either the problem is totally unrelated, or else you're not telling the whole story. Post to the correct forum with enough information, and likely someone will help you find the solution.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top