Answers for "excel vba conditional compilation arguments"

VBA
0

excel vba conditional compilation arguments

' Test will pause execution on false assert only on debug mode
#Const DebugMode = True
Sub TestMe()
    Dim iVar As Integer
    iVar = -1
    #If DebugMode Then
        Debug.Assert iVar >= 0 ' False -> Pause
        MsgBox "Debug Mode", vbExclamation
    #Else
        MsgBox "Production Mode", vbInformation
    #End If
End Sub
Posted by: Guest on January-23-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language