debug print help

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
618
If I wanted/hoped to have a screenshot of the exact error (specifically the highlighted line) of code and to save it in a file on my desktop. I am not exactly sure how to do this and was hoping I could get some help. Thanks!
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
41,087
Office Version
365
Platform
Windows
I know of no way to do that, the closest is to use line numbers & report that like
Code:
Sub sassriverrat()
         Dim Rng As Range
         
10       On Error GoTo myerr
20       Set Rng = Sheets(1).Range("A2", Range("A" & Rows.Count).ende(xlUp))
         
30       Exit Sub
myerr:
40       MsgBox "Error " & Err.Number & vbLf & Err.Description & vbLf & "On line " & Erl
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,099,787
Messages
5,470,769
Members
406,720
Latest member
tylergaps

This Week's Hot Topics

Top