Thread: Inserting a row
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sheeny[_15_] Sheeny[_15_] is offline
external usenet poster
 
Posts: 1
Default Inserting a row

Hi

Im not quite sure what Im doing wrong...

Based on a value in a list box, I want to insert a row in the prope
alphabetical order.

This is what I have:

Private Sub CmdUpdateNew_Click()

Sheet2.Activate
Sheet2.Range("A4").Select

For i = 4 To Range("A65536").End(xlUp).Row
If Range("A" & i) Value ListNew.Value And
Range("A" & i - 1).Value < ListNew.Value Then
Rows(i).Insert
Exit For
End If
Next i


End Sub

Any ideas or help will be REALLLY appreciated!

Thanks!
Sheen

--
Message posted from http://www.ExcelForum.com