ich habe ein Makro das mir die 2te oder 3te Zeile markiert - siehe Anlage. Das Problem: markiert man mehr als ca. 90 Zeilen bricht es ab - liegt wohl an der String-Variablen.
Wer hat eine Lösung?
Gruß Lars
Sub Rows_Second()
Dim lRow As Long
Dim sRows As String
Dim bln As Boolean
For lRow = Selection.Row To Selection.Row + Selection.Rows.Count
bln = Not bln
If bln Then
sRows = sRows & "," & lRow & ":" & lRow
End If
Next lRow
sRows = Right(sRows, Len(sRows) - 1)
Range("" & sRows & "").Select
End Sub
Sub Rows_Third()
Dim lRow As Long
Dim sRows As String
Dim bln3 As Integer
For lRow = Selection.Row To Selection.Row + Selection.Rows.Count
bln3 = bln3 Mod 3 + 1
If bln3 = 1 Then
sRows = sRows & "," & lRow & ":" & lRow
End If
Next lRow
sRows = Right(sRows, Len(sRows) - 1)
Range("" & sRows & "").Select
End Sub