Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default One more request on row insertion.

I'm about to take off on maternity leave in 8 days and I appreciate
all the help on this.

With the help of a couple programmers.

I've managed to get this - It works fine only the rows do not insert
properly after the first set. The background color changes over the
data and not adding a new row. I've uploaded an image example.

http://bp1.blogger.com/_0XguicNvp2w/...-h/example.bmp

Thanks again for all the efforts.


Option Explicit
Dim MyCell, MyRng As Range
Dim i As Integer


Private Sub CommandButton1_Click()
Set MyRng = [a1:a65000]
For Each MyCell In MyRng
If InStr(MyCell.Value, "Total") 0 Then
MyCell.Offset(1, 0).Select
Do While i < 4
ActiveCell.EntireRow.Insert
i = i + 1
Loop
ActiveCell.Value = "Avails"
ActiveCell.EntireRow.Interior.ColorIndex = 5
ActiveCell.Offset(1, 0).Value = "Left"
ActiveCell.Offset(1, 0).EntireRow.Interior.ColorIndex = 6
End If
Next MyCell
i = 0
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default One more request on row insertion.

THANKS STEVE & PAUL for your help on this!!!!

With your help I've got it to work..

Please, disregard this request.

Regards, Gwen

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
Row Insertion mlockman Excel Discussion (Misc queries) 0 April 17th 09 03:33 PM
Row Insertion Problem robot[_3_] New Users to Excel 2 February 7th 09 04:38 AM
Rows Insertion b166er[_4_] Excel Programming 1 June 22nd 06 03:47 PM
Line insertion Andy Excel Programming 2 January 30th 04 04:48 PM
VBA Code- Row Insertion Jeff Excel Programming 3 November 11th 03 09:48 PM


All times are GMT +1. The time now is 04:53 PM.

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

About Us

"It's about Microsoft Excel"