Skip to main content
ExcelBaby.com
Course
Getting Started with Excel
Excel Formulas and Functions
Excel Troubleshooting
Programming with Excel VBA
Excel VBA and Macro Examples
Docs
Learn
Functions
Questions
Shortcuts
Resources
Books
Home
ยป
#If...Then...#Else directive
Docs
#If...Then...#Else directive
Conditionally compiles selected blocks of Visual Basic code. Syntax #If expression Then statements [ #ElseIf expression-n Then [ elseifstatements ]] [ #Else […]
#If...Then...#Else directive