IsDebug
Option Explicit Public bolRunningInDebug As Boolean Private Sub Form_Load() On Error Goto ErrorHandler Debug.Print 1 / 0 Exit Sub ErrorHandler: If Err.Number = 11 Then bolRunningInDebug = True Resume Next End If End Sub
Option Explicit
Public bolRunningInDebug As Boolean
Private Sub Form_Load()
On Error Goto ErrorHandler
Debug.Print 1 / 0
Exit Sub
ErrorHandler:
If Err.Number = 11 Then
bolRunningInDebug = True
Resume Next
End If
End Sub
( isdebug.html )- by Paolo Puglisi
- Modifica del 17/12/2023