0% found this document useful (0 votes)
4 views2 pages

Visual Basic Integer Operations Code

This document contains code for 8 command buttons and a form load event that populate 4 lists with values from input boxes. Command1-4 clear the lists and populate them using For, Do Until, While, and Do While loops respectively. Command5-6 clear the lists and populate them using reversed Do Until and Do While loops. Command7-8 clear the text boxes and lists. The form load event populates text boxes with input box values.

Uploaded by

Limberto Suarez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Visual Basic Integer Operations Code

This document contains code for 8 command buttons and a form load event that populate 4 lists with values from input boxes. Command1-4 clear the lists and populate them using For, Do Until, While, and Do While loops respectively. Command5-6 clear the lists and populate them using reversed Do Until and Do While loops. Command7-8 clear the text boxes and lists. The form load event populates text boxes with input box values.

Uploaded by

Limberto Suarez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Suarez, Limberto B. Prof.

Tabios
B.S.I.T. – 2D
Dim a, b, c As Integer Private Sub Command4_Click() Private Sub Command7_Click()
[Link] [Link]
Private Sub Command1_Click() [Link] [Link]
[Link] [Link] [Link]
[Link] [Link] [Link]
[Link] [Link] = ""
[Link] c=a [Link] = ""
Do Until c > b a = InputBox("Please type a
For c = a To b [Link] c number", "Number Entry",
[Link] c [Link] c ^ 2 "type here")
[Link] c ^ 2 [Link] c ^ 3 b = InputBox("Please type a
[Link] c ^ 3 [Link] c ^ 4 number", "Number Entry",
[Link] c ^ 4 c=c+1 "type here")
Next Loop [Link] = Val(a)
End Sub End Sub [Link] = Val(b)
End Sub
Private Sub Command2_Click() Private Sub Command5_Click()
[Link] [Link] Private Sub Command8_Click()
[Link] [Link] End
[Link] [Link] End Sub
[Link] [Link]
Private Sub Form_Load()
c=a c=a a = InputBox("Please type a
Do Do number", "Number Entry",
[Link] c [Link] c "type here")
[Link] c ^ 2 [Link] c ^ 2 b = InputBox("Please type a
[Link] c ^ 3 [Link] c ^ 3 number", "Number Entry",
[Link] c ^ 4 [Link] c ^ 4 "type here")
c=c+1 c=c+1 [Link] = Val(a)
Loop While c <= b Loop Until c > b [Link] = Val(b)
End Sub End Sub End Sub

Private Sub Command3_Click() Private Sub Command6_Click()


[Link] [Link]
[Link] [Link]
[Link] [Link]
[Link] [Link]

c=a c=a
While c <= b Do While c <= b
[Link] c [Link] c
[Link] c ^ 2 [Link] c ^ 2
[Link] c ^ 3 [Link] c ^ 3
[Link] c ^ 4 [Link] c ^ 4
c=c+1 c=c+1
Wend Loop
End Sub End Sub

You might also like