array-to-row autofilter issue
For further clarification, this is an example of an array to row macro, which
pastes the contents of an array all at once to an entire row. For a
worksheet with hidden columns and a row that is part of an autofilter (but is
still visible according to filter criteria) this produces bad data.
Sub ArraytoRow()
Dim dataarr() As Variant
ReDim dataarr(1 To 1, 1 To 256)
Dim i As Integer, j As Integer
For i = 1 To 1
For j = 1 To 256
dataarr(i, j) = j
Next
Next
Range("A12:IV12").Value = dataarr
End Sub
|