VB Exercise 5-5 - Exercise 5-5.I used a piece of code I found on the internet as the basis of todays exercise The original code was the clearing

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise 5-5 ….I used a piece of code I found on the internet 2/22/2010 as the basis of today’s exercise. The original code was the clearing text boxes using a For Each …. .Next loop. Dim objControl As Control For Each objControl In Me.Controls If TypeOf objControl Is TextBox Then objControl.Text = "" ' clear the text End If Next In my code today, I modified the above code to allow me to cycle thru a series of 12 text boxes. The exercise instructs us to enter the rain fall amount for each month. Add to obtain a yearly total and divide (by 12) to obtain a monthly average rain fall. Start program Code Imports Microsoft.VisualBasic.Constants 'Library Module Imports Microsoft.VisualBasic.ControlChars 'Library Module Public Class Form1 Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() 'Stop and end Program End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/11/2011 for the course COP 1332 taught by Professor Ryland during the Spring '11 term at American College of Computer & Information Sciences.

Page1 / 3

VB Exercise 5-5 - Exercise 5-5.I used a piece of code I found on the internet as the basis of todays exercise The original code was the clearing

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online