Array in Zeile
robert
ich kapier Array einfach nicht :-((
in diesen bereich-
Range(Cells(lz, 1), Cells(lz, 5)) = myArr
soll eingetragen werden.
zeile(lz), spalte 1 bis 5 ist aber nicht gefüllt-warum nicht?
was mache ich falsch ?
gruß
robert
Private Sub CommandButton1_Click()
Dim lz As Long, i As Integer
Dim myArr(1, 5)
lz = Cells(Rows.Count, 1).End(xlUp).Row + 1
myArr(1, 1) = ComboBox1
myArr(1, 2) = ComboBox2.Value
myArr(1, 3) = CDate(TextBox4)
myArr(1, 4) = ComboBox3
myArr(1, 5) = CDbl(TextBox1.Value)
Range(Cells(lz, 1), Cells(lz, 5)) = myArr
Cells(lz, 11) = Cells(lz, 11).Value
ComboBox1 = ""
ComboBox2 = ""
ComboBox3 = ""
TextBox1 = ""
TextBox4 = ""
End Sub
PS. es könnten auch mehr CB oder TB sein...