Remove row in list based on user input
see if following will do what you want?
Sub DeleteRow()
Dim Rowno As Variant
On Error Resume Next
Set Rowno = Application.InputBox(Prompt:="Click on the row you wish to
delete", Title:="Delete Row", Type:=8)
If VarType(Rowno.Value) = vbBoolean Then
If Rowno = False Then
Debug.Print "user cancelled"
Exit Sub
End If
End If
Range(Rowno.Address).EntireRow.Delete
End Sub
--
jb
"Beeo" wrote:
Hello
I have a data-list (excel 2003) with records and the following code
RowNo = Application.InputBox(Prompt:="Click on the row you wish to
delete", Title:="Delete row", Type:=1 + 2)
Selection.ListObject.ListRows(RowNo).Delete
But it's not working. Help appreciated (I'm new to this so please be
nice :)
Tia / Beeo
|