VBA Code will nicht ...
25.11.2008 20:25:39
maxx_1985
liegt es daran, dass bei dem next das "i" fehlt? eigentlich nicht, oder? ich habs mit und ohne ausprobiert.
danke euch
gruss
denis
Sub highlight_and_copy_datarange()
Dim i As Long
Dim myRng As Range
With ActiveSheet
For i = 1 To .Cells(Rows.Count, 2).End(xlUp).Row
If .Cells(i, 2) "" Then
If myRng Is Nothing Then
Set myRng = .Range(.Cells(i, 1), .Cells(i, 8))
Else
Set myRng = Union(myRng, .Range(.Cells(i, 1), .Cells(i, 8)))
End If
End If
Next
End With
myRng.Select
myRng.Copy
End Sub