Question Error Problem

Engineerist

New member
Joined
Apr 7, 2012
Messages
4
Programming Experience
Beginner
Hi everybody,


I have two form in my program. In Form1 I fill listview1 with code below,


cap = Math.Sqrt((4 * Val(TextBox1.Text)) / (20 * Math.PI))
        cap = Math.Round(cap, 1)
        say = 0


        Do
            cap = cap - 0.05
            hiz = Val(TextBox1.Text) / ((Math.PI * cap ^ 2) / 4)
            kolon = (recine / 1000) / ((Math.PI * cap ^ 2) / 4)


            ListView1.Items.Add(Math.Round(cap, 2))


            ListView1.Items(say).SubItems.Add(Math.Round(hiz, 2))
            ListView1.Items(say).SubItems.Add(Math.Round(kolon, 2))
            say = say + 1
        Loop Until (hiz >= 50)


But when i try to fill listview in form2, i recieve error. Code like this

Do


Vrecine = InputBox("Tank içine konulacak reçine miktarı ?" & Chr(13) & "Örneğin 2500 Litre", "Reçine Miktarınız ?")
            If Len(Vrecine) = 0 Then
                
                Exit Sub
            End If
        Loop While Not IsNumeric(Vrecine)


        Hrecine = 0.85
        Vrecine = Vrecine / 1000
        say2 = 0
        Form2.Show()


        Do


            Hrecine = Hrecine + 0.05
            cap2 = Math.Sqrt((4 * Vrecine) / (Math.PI * Hrecine))
            Alan = (Math.PI * cap2 ^ 2) / 4
            Form2.ListView1.Items.Add(Math.Round(cap2, 2))


            Form2.ListView1.Items(say2).SubItems.add(Math.Round(Alan, 2))
            Form2.ListView1.Items(say2).SubItems.add(Hrecine)


            say2 = say2 + 1


        Loop Until (Hrecine >= 1.8)


THIS PART OF THE CODE RECIEVE ERROR

Form2.ListView1.Items(say2).SubItems.add(Math.Round(Alan, 2))
Form2.ListView1.Items(say2).SubItems.add(Hrecine)


Can anyone know this?
 
Last edited by a moderator:
I have formatted your code for readability. Please do so for us in future posts.

If there's an error then there's an error message, which will tell you (and us) what to look for.
 
Back
Top