I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted?
For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there and not removed?
I also have this code but it delete the entire row instead of the table row only. Could you please help me to modify my code?
For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there and not removed?
I also have this code but it delete the entire row instead of the table row only. Could you please help me to modify my code?
VBA Code:
Private Sub CommandButton5_Click()
Dim profile_id As String
profile_id = ComboBox9.value
Lastrow = Sheets("Profile").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To Lastrow
If Sheets("Profile").Cells(i, 1).value = profile_id Then
Sheets("Profile").Rows(i).Delete
Unload Me
MsgBox "Your data has been deleted", vbOKOnly, "Successful"
End If
Next
End Sub