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

AlexB123

Board Regular
Joined
Dec 19, 2014
Messages
203
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

 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Watch MrExcel Video

Forum statistics

Threads
1,123,505
Messages
5,602,062
Members
414,498
Latest member
jordanmiller7890

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
Top