1. 条件编译测试代码
Option Explicit
'#Const DEBUG_MODE = 1
Sub DebugMode()
#If DEBUG_MODE = 1 Then
MsgBox "Debug Mode", vbInformation
#Else
MsgBox "PRD Mode", vbInformation
#End If
Application.Cursor = xlWait
Application.Wait Now + TimeSerial(0, 0, 1)
Application.Cursor = xlDefault
MsgBox "Done."
End Sub