Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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! =-----
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Insert Variable Number of Rows; With Loop ryguy7272 Excel Worksheet Functions 2 December 27th 06 08:25 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
help on insert rows and fill down loop until end mark mcgrath Excel Programming 1 January 16th 04 01:50 AM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"