ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If Debug then end with msgbox (https://www.excelbanter.com/excel-programming/297302-if-debug-then-end-msgbox.html)

ianripping[_58_]

If Debug then end with msgbox
 
Is it possible to make a message appear if a debug message occurs, an
also depending on the type of debug, eg 'error 13

--
Message posted from http://www.ExcelForum.com


Papou

If Debug then end with msgbox
 
On Error GoTo Error_Handler
'instructions
Exit Sub

Error_Handler:
Select Case Err.Number
Case 13
MsgBox "This error is due to..."
Exit Sub
Case Else
Exit Sub
End Select

HTH
Regards
Pascal


"ianripping " a écrit dans le
message de news: ...
Is it possible to make a message appear if a debug message occurs, and
also depending on the type of debug, eg 'error 13'


---
Message posted from
http://www.ExcelForum.com/




Michel Pierron[_2_]

If Debug then end with msgbox
 
Hi ianripping;
For example:

On Error GoTo Bug
' Your code

On Error GoTo 0
Exit Sub
Bug: MsgBox "Error " & Err.Number & vbLf & Err.Description & " !", 64
End Sub

Regards
MP

"ianripping " a écrit dans le message
de ...
Is it possible to make a message appear if a debug message occurs, and
also depending on the type of debug, eg 'error 13'


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com