How to research Error Handling Messages, Trying to Resolve "Unreadable content" Message

AlexB123

Board Regular
Joined
Dec 19, 2014
Messages
207
Hi all,

I am revamping an old macro that creates a new workbook and then saves to a network location. Although my code works, the file that saves generates a recovery process and message from Excel: "Excel has found unreadable content
in <filename.xlsx>. Do you want to recover the contents of this workbook?" I have found many explanations for this error, but I believe it has something to do with my code. I found the following error handler, because I need to find out specifically what errors are being generated.

I am getting the error numbers, but I am not sure if the output is being sent to some sort of system file, or what I can do to look up the error numbers.

Any suggestions are appreciated.

At the top of my code:
Code:
On Error GoTo errHand1
        DivisionByZero = 1 / 0
        Resume Next

Code:
errHand1:
    If Err.Number <> 0 Then
     Msg = "Error # " & Str(Err.Number) & " was generated by " _
         & Err.Source & Chr(13) & "Error Line: " & Erl & Chr(13) & Err.Description
     MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
     End If
Resume Next

 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top