kann mir jemand erklären, warum Excel 2010 die folgenden Befehle (CDate(.Range ...) moniert
With ThisWorkbook.Worksheets("Pressplan")
Do While dDatum = CDate(.Range("A" & lZeile).Value) And _
sSchicht = .Range("B" & lZeile).Value
Controls("TextBox" & iIndx - 40) = .Range("N" & lZeile).Value ' TB 21-28
Controls("TextBox" & iIndx - 60) = .Range("Z" & lZeile).Value ' TB 1- 8
Controls("TextBox" & iIndx - 20) = .Range("M" & lZeile).Text ' TB 41-48
Controls("TextBox" & iIndx - 0) = .Range("AB" & lZeile).Value ' TB 61-68
lZeile = lZeile + 1
iIndx = iIndx + 1
If iIndx > 68 Then Exit Do ' alle TextBoxes gefüllt!
Loop
End With
aber als CDate.Celle(... )
With ThisWorkbook.Worksheets("Pressplan")
Do While dDatum = CDate(.Cells(lZeile, 1).Value) And _
sSchicht = .Cells(lZeile, 2).Value
Controls("TextBox" & iIndx - 40) = .Range("N" & lZeile).Value ' TB 21-28
Controls("TextBox" & iIndx - 60) = .Range("Z" & lZeile).Value ' TB 1- 8
Controls("TextBox" & iIndx - 20) = .Range("M" & lZeile).Text ' TB 41-48
Controls("TextBox" & iIndx - 0) = .Range("AB" & lZeile).Value ' TB 61-68
lZeile = lZeile + 1
iIndx = iIndx + 1
If iIndx > 68 Then Exit Do ' alle TextBoxes gefüllt!
Loop
End With
sauber verarbeitet?
Der Fehlerhinweis ist: Laufzeitfehler '16': Ausdruck zu komplex.
Gewiss das 'Problem' ist mit Cells lösbar, aber warum ist das so?
Gruß Peter