Option
Explicit
Option
Base 1
Type GlobalDatenfeld
VN
As
String
NN
As
String
MNR
As
Integer
HUE
As
Single
KL
As
Double
SUM
As
Double
Note
As
Double
End
Type
Public
Function
AnzahlDatensätze()
As
Integer
Dim
i
As
Integer
i = 2
Do
If
Tabelle1.Cells(i, 1).Value =
""
Then
Exit
Do
i = i + 1
Loop
AnzahlDatensätze = i - 2
MsgBox
"Anzahl = "
& AnzahlDatensätze
End
Function
Function
MNRFinden()
As
Integer
Dim
i
As
Integer
Dim
x
As
Integer
Dim
MatrikelNr
As
Integer
x = InputBox(
"Matrikel-Nr."
)
For
i = 1
To
7
If
x = Tabelle1.Cells(i, 4)
Then
MsgBox
"Zeile ="
& i
End
If
Next
i
End
Function
Public
Sub
Hauptprogramm()
Dim
Datenfeld()
As
GlobalDatenfeld
ReDim
Datenfeld(AnzahlDatensätze)
Dim
i
As
Integer
For
i = 1
To
AnzahlDatensätze
With
Datenfeld(i)
.VN = Cells(i + 1, 2)
.NN = Cells(i + 1, 3)
.MNR = Cells(i + 1, 4)
.HUE = Cells(i + 1, 5)
.KL = Cells(i + 1, 6)
End
With
Next
i
End
Sub
Sub
calNoten()
End
Sub