View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jgeniti[_2_] jgeniti[_2_] is offline
external usenet poster
 
Posts: 2
Default Why is inserting rows throwing off my hidden rows

I have a macro that is using the following code to copy a template row
that is hidden and then it inserts that row below it. The problem is
that all of the hidden rows that are below where I'm inserting are not
changing to account for the added row.

For example.
rows 15, 20 and 25 have templates in them and are hidden
then I will do the following
copy template from row 10
insert template at row 12

Even though all of the data has shifted down 1 row, rows 15, 20 and 25
are still hidden and all of the data that was in those hidden rows are
now showing in rows 16, 21 and 26.

Sheets("Inline").Range("Template").Copy
Sheets("Inline").Range("ResDetEnd").Insert Shift:=xlDown
Application.CutCopyMode = False

Am I forgetting something? Any help would be appreciated.
Thanks,
James