Use #If
#Const Debugging = True Public Sub Trap(ByVal Source As String, ByVal Message As String) #If Debugging Then Call DebugPrint(Source, Message) Stop #End If End Sub