VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 6135 ClientLeft = 60 ClientTop = 450 ClientWidth = 7500 BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty LinkTopic = "Form1" ScaleHeight = 6135 ScaleWidth = 7500 StartUpPosition = 3 'Windows Default Begin VB.PictureBox picOut Height = 5655 Left = 120 ScaleHeight = 5595 ScaleWidth = 4155 TabIndex = 6 Top = 120 Width = 4215 End Begin VB.CommandButton cmdSix Caption = "Six" Height = 495 Left = 6000 TabIndex = 5 Top = 1800 Width = 1215 End Begin VB.CommandButton cmdFive Caption = "Five" Height = 495 Left = 4440 TabIndex = 4 Top = 1800 Width = 1215 End Begin VB.CommandButton cmdFour Caption = "Four" Height = 495 Left = 6000 TabIndex = 3 Top = 1080 Width = 1215 End Begin VB.CommandButton cmdThree Caption = "Three" Height = 495 Left = 4440 TabIndex = 2 Top = 1080 Width = 1215 End Begin VB.CommandButton cmdTwo Caption = "Two" Height = 495 Left = 6000 TabIndex = 1 Top = 240 Width = 1215 End Begin VB.CommandButton cmdOne Caption = "One" Height = 495 Left = 4440 TabIndex = 0 Top = 240 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub repeat_kays_name(num As Integer) 'print out num copies of my name Dim counter As Integer For counter = 1 To num picOut.Print "Kay" Next counter End Sub Private Sub cmdOne_Click() 'print Kay 8 times picOut.Cls Call repeat_kays_name(8) End Sub Private Sub print_5_copies(thing_to_print As Integer) Dim i As Integer For i = 1 To 5 picOut.Print thing_to_print; Next i picOut.Print 'hit enter End Sub Private Sub cmdTwo_Click() '11111 '22222 '33333 Dim i As Integer picOut.Cls For i = 1 To 3 Call print_5_copies(i) Next i End Sub Private Sub print_one_to_5() Dim this_is_not_i As Integer For this_is_not_i = 1 To 5 picOut.Print this_is_not_i; Next this_is_not_i picOut.Print End Sub Private Sub cmdThree_Click() '7 rows of 12345 picOut.Cls Dim foo As Integer picOut.Print "About to loop" For foo = 1 To 7 Call print_one_to_5 Next foo picOut.Print "I finished my loop" End Sub Private Sub cmdFour_Click() 'as many rows as you want of 12345 Dim rows As Integer rows = Val(InputBox("How many rows do you want?")) picOut.Cls Dim foo As Integer picOut.Print "About to loop" For foo = 1 To rows Call print_one_to_5 Next foo picOut.Print "I finished my loop" End Sub Private Sub print_one_to_anything(top As Integer) Dim yabba As Integer For yabba = 1 To top picOut.Print yabba; Next yabba picOut.Print End Sub Private Sub print_stars(top As Integer) Dim yabba As Integer For yabba = 1 To top picOut.Print "*"; Next yabba picOut.Print End Sub Private Sub cmdFive_Click() 'as many rows and cols of 12345... Dim rows As Integer, big As Integer rows = Val(InputBox("How many rows do you want?")) big = Val(InputBox("How big do you want me to count?")) picOut.Cls picOut.Print rows; " rows, counting from 1 to"; big Dim foo As Integer picOut.Print "About to loop" For foo = 1 To rows Call print_one_to_anything(big) Next foo picOut.Print "I finished my loop" End Sub Private Sub cmdSix_click() 'as many rows and cols of stars 'as many rows and cols of 12345... Dim rows As Integer, big As Integer rows = Val(InputBox("How many rows do you want?")) big = Val(InputBox("How long do you want me to star?")) picOut.Cls picOut.Print rows; " rows, with"; big; " stars" Dim foo As Integer picOut.Print "About to loop" For foo = 1 To rows Call print_stars(big) Next foo picOut.Print "I finished my loop" End Sub