View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALV ALV is offline
external usenet poster
 
Posts: 12
Default Turn filters off and back on

I'm trying to write a large array to a range on a sheet next to another range
that may have filtered rows.

I'm doing this:

rng.Cells.set_Value(Type.Missing, (object)arrValues);

arrValues is a 2-dimensional array with nulls on the filtered rows (because
it is derived from the range it is being pasted next to).

When there are no filtered or hidden rows in the adjacent range, this is
fast and works fine.

But when rows are filtered, the data I write gets scrambled and repeated
after the first filtered row.

Does anyone know if there is a way to turn the filter off before writing and
then turn it back on after?

Thanks.