lab4redo - End Sub Sub coverCalc ByVal percent As Integer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Display a discription of cloud cover based on percentage Dim percent As Integer , cloudCover As String percent = (TextBox1.Text) ListBox1.Items.Clear() coverCalc(percent, cloudCover) ListBox1.Items.Add( "It is " & cloudCover & " with " & percent & "% cloud cover." )
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: End Sub Sub coverCalc( ByVal percent As Integer , ByRef cloudCover As String ) percent = (TextBox1.Text) Put in main sub button Click, before the coverCalc If percent > 99% Then cloudCover = "Overcast" ElseIf percent > 70% Then cloudCover = "Cloudy" ElseIf percent > 30% Then cloudCover = "Partly Cloudy" Else cloudCover = "Clear" End If End Sub...
View Full Document

Ask a homework question - tutors are online