XL: Visual Basic Example Using If and Case Statements (141691)
The information in this article applies to:
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0
- Microsoft Excel for Windows 5.0c
- Microsoft Excel for the Macintosh 5.0
- Microsoft Excel for the Macintosh 5.0a
- Microsoft Excel 97 for Windows
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q141691 SUMMARY
In Microsoft Visual Basic for Applications, there are two statements that
you can use to perform a conditional test: an If...Then...Else statement or a Select Case statement. The If...Then...Else statement executes a group of statements based on the value of an expression, and the Select Case statement executes one of several of statements based on the value of an expression.
REFERENCES
For more information about controlling program flow, click Answer Wizard on the Help menu and type:
tell me about conditional programming "Visual Basic User's Guide," version 5.0, Chapter 7, "Controlling How Your Code Runs"
Microsoft Press: "Microsoft Excel/Visual Basic Programmer's Guide", version 7.0, Chapter 3, "Controlling Program Flow"
In Microsoft Excel version 5.0, click Contents on the Help menu, click Programming With Visual Basic; then click the Search button and type:
For additional information about getting help with Visual Basic for
Applications, please click the article number below to view the article in the Microsoft Knowledge Base:
163435
VBA: Programming Resources for Visual Basic for Applications
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbhowto kbProgramming KB141691 |
---|
|