Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help on adding one if a number is entered more than once

Status
Not open for further replies.

corriejgreen

IS-IT--Management
Mar 2, 2013
2
GB
hello!

The software will
. Allow one of six minibeats to be selected from a menu | :)
. Enter and store the name and grid coordinate of the selected minibeast | :)
.display how often each minibeats was found
.display the minibeast found at a selected coordinate

this is my problem, the first two with :) means ive done it, now i have to do the last two, here is my current code, anyone got any ideas. Im really stuck thankyou so much if you can help me!


Public Class Form1

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim minibeast(10) As Integer
Dim coordinate As String
Dim index As Integer
Dim how_many As Integer
Dim how_many_slug As Integer


index = -1

Do
index += 1

minibeast(index) = InputBox("enter number of minibeast")

lst_display.Items.Add(minibeast(index))

coordinate = InputBox("enter the coordinate of minibeast")

lst_coordinate.Items.Add(coordinate)

how_many = InputBox("How many of this minibeast was found at " & coordinate)

lst_how_many.Items.Add(how_many)


Loop Until minibeast(index) = 7


txt_amount.Text = index

If minibeast(index) = 1 Then how_many_slug = how_many +


End Sub
End Class
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top