Remove Table Row From Userform

Status
Not open for further replies.

Enjoylyfe

New Member
Joined
Apr 29, 2020
Messages
17
Office Version
  1. 365
Platform
  1. Windows
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?

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
1588178674056.jpg
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Duplicate Remove Table Row From Userform

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top