Cant run insert row through loop
Anyone know why the following code wont run through a loop without an error
The "Selection.insert" wont insert a row the second time.............it will do it the first time through a loop then when the value "Current_Row" increases it bombs I also tried "Rows(Current_Row).insert" with the same results Current row is dimensioned as an integer Current_Row = Range(Range(ActiveCell.Address).Address).Row ActiveCell.Offset(1, 0).Select Next_Address = ActiveCell.Address Rows(Current_Row).Select Selection.Insert Shift:=xlDown -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- |
Cant run insert row through loop
Try Rows(current_row).entirerow.select
Keith www.kjtfs.com WashoeJeff wrote: *Anyone know why the following code wont run through a loop withou an error The "Selection.insert" wont insert a row the secon time.............it will do it the first time through a loop then when the valu "Current_Row" increases it bombs I also tried "Rows(Current_Row).insert" with th same results Current row is dimensioned as an integer Current_Row = Range(Range(ActiveCell.Address).Address).Row ActiveCell.Offset(1, 0).Select Next_Address = ActiveCell.Address Rows(Current_Row).Select Selection.Insert Shift:=xlDown -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com