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 proper 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).EntireRow.Insert
Exit For
End If
Next
End Sub
Any help would be greatly appreciated!
Thanks!
Sheeny
Im not quite sure what Im doing wrong...
Based on a value in a list box, I want to insert a row in the proper 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).EntireRow.Insert
Exit For
End If
Next
End Sub
Any help would be greatly appreciated!
Thanks!
Sheeny