Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

Expected 'If'

You created an If...Then...Else block, but did not properly terminate the block. A block If statement must be the first statement on a line, and must end with an End If statement. The following demonstrates the correct structure of a If...Then...Else block.

If condition Then
   [statements]
[ElseIf condition-n Then
   [elseifstatements]] . . .
[Else
   [elsestatements]]
End If

To correct this error

  • Check to see if you ended your block If statement with an End statement. If so, change it to an End If statement.

See Also

If...Then...Else Statement


     Company Reports | MPAA | Remortgages | Free Ringtone | Free Myspace Layouts
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp