Hi.
Im trying to adapt the below code which delets a row of data from the selection of a listbox within a userform. How can i update this code to delete the row of a specific worksheet which isnt the active worksheet?
Thanks.
Im trying to adapt the below code which delets a row of data from the selection of a listbox within a userform. How can i update this code to delete the row of a specific worksheet which isnt the active worksheet?
Thanks.
Code:
Private Sub CommandButtonDeleteSample_Click()
Dim i As Integer
For i = 1 To Range("A65356").End(xlUp).Row - 1
If lstDisplay.Selected(i) Then
Rows(i + 1).Select
Selection.Delete
End If
Next i
End Sub