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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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