Unzulassiger Verwendung von Null
30.05.2018 10:57:48
Null
nach dem Code von ChrisL habe eine Erweiterung eingebaut (Label), bekomme leider die Fehlermeldung: Unzulassiger Verwendung von Null.
Hier der Code:
Private Sub ListBox1_Click()
Dim i As Integer, y As Integer, intWert As Integer, intCounter As Integer
If ListBox1.List(ListBox1.ListIndex, 0) = "" Then
Call PunkteEinblenden(False)
Call LabelEinblenden(False)
Exit Sub
Else
Call PunkteEinblenden(True)
Call LabelEinblenden(True)
End If
For i = 6 To 1 Step -1
Controls("Punkt" & i).Top = Image1.Top + (((Image1.Height - (Punkt1.Height * 6)) / 12) _
* (((i - 1) * 2) + 1)) + ((i - 1) * Punkt1.Height)
If ListBox1.List(ListBox1.ListIndex, intCounter) = "x" Then
intWert = 1
Else
intWert = ListBox1.List(ListBox1.ListIndex, intCounter) + 1
End If
Controls("Punkt" & i).Left = Image1.Left + (((Image1.Width - (Punkt1.Width * 15)) / 32) * _
(((intWert - 1) * 2) - 1.5)) + ((intWert - 1) * Punkt1.Width)
intCounter = intCounter + 1
Next i
For y = 6 To 1 Step -1
Controls("Label" & y).Top = Image1.Top + (((Image1.Height - (Label1.Height * 6)) / 12) _
* (((y - 1) * 2) + 1)) + ((y - 1) * Label1.Height)
If ListBox1.List(ListBox1.ListIndex, intCounter) = "x" Then
intWert = 1
Else
intWert = ListBox1.List(ListBox1.ListIndex, intCounter) + 1
End If
Controls("Label" & y).Left = Image1.Left + (((Image1.Width - (Label1.Width * 15)) / 32) * _
(((intWert - 1) * 2) - 1.5)) + ((intWert - 1) * Label1.Width)
intCounter = intCounter + 1
Next y
End Sub
In der Zeile fett dargestellt.Kan mir jemandem auf die Sprunge helfen den Fehler zu beheben.
@Chris falls online bist kannst du bitte darüber schauen?
Danke im Voraus
Antonio