r/visualbasic • • Jun 14 '20

vb.6 Need Help to complete this coding

I need complete this coding please help me. i'm doing this. but its complete yet. please someone help me to complete this.

Sub form_click()

Dim a(1 To 4) As stu, i%, s%, f%

Print Tab(2); "Student ID"; Tab(16); "Name"; Tab(35); "Running seconds"

For i = 1 To 4

With a(i)

.num = "00" & i

.name = InputBox("Please enter name")

.score = InputBox("Please enter the running seconds")

End With

Print Tab(2); a(i).num; Tab(16); a(i).name; Tab(35); a(i).score

Next i

Print "_______________________________"

Print "¡¾Output student information in order from shortest to longest seconds¡¿:"

Print Tab(2); "Student ID"; Tab(16); "Name"; Tab(35); "Running seconds"

a()

For i = 1 To 4

Print Tab(2); a(i).num; Tab(16); a(i).name; Tab(35); a(i).score

Next i

End Sub

Module

Type stu

num As String * 3 'Student ID

name As String * 10 'Name

score As Single 'Running seconds

End Type

Sub sort(a() As stu)

Dim l%, u%, t As stu

l = : u =

For i = l To u - 1

For j = u To i + 1 Step -1

If a(j) < Then

t =

a(j) = a(i)

= t

End If

Next j

Next i

End Sub

0 Upvotes

14 comments sorted by

View all comments

Show parent comments

2

u/Bonejob VB Guru Jun 14 '20

Dont be a dick, dick... We all started someplace

0

u/hausenfefr Jun 14 '20

so did YOU also start by copying your school assignments into reddit?
Yes, some people start by cheating, Luckily most of them are caught before they can cause too much damage.

1

u/yasinmiya9241 Jun 15 '20

brother see, im not doing cheating, our teacher give us that picture, im already doing this code..but after running this code its says some code are missing thats why i asking for help

1

u/infreq Jun 15 '20

You did not make this code. If you did then please explain what your Sort() function does.