Share this Page URL

Chapter 5. Using Visual Basic to Automat... > Using Control Structures - Pg. 159

Using Visual Basic to Automate Your Database 159 5. Enter the following Sub procedure. (The Sub...End Sub framework is provided, of course.) Public Sub SalesGoal() Dim intSalesGoal As Integer intSalesGoal = InputBox("Please enter your sales goal") If intSalesGoal > 10000 Then MsgBox "You've exceeded expectations." ElseIf intSalesGoal > 5000 Then