EzzatHesham
New Member
- Joined
- Jun 10, 2022
- Messages
- 7
- Office Version
- 2016
- Platform
- Windows
Hello everyone,
Is there any way to delete an entire row by a command button in userform but without deleting column a, i want to delete row from columns (b to y), and thats a code i used.
Thanks for helping
Is there any way to delete an entire row by a command button in userform but without deleting column a, i want to delete row from columns (b to y), and thats a code i used.
VBA Code:
Private sub cmddeleteee_click()
Sheet7.range("d4").value=edit2form.textbox26.value
Dim ans as vbmsgboxresult
Dim ldelete as integer
Ans=msgbox(".......",vbcritical+vbquestion+vbyesno,"......")
Ldelete=sheet7.range("c4").value
If ans = vbyes then
Sheet1.rows(ldelete).delete
Msgbox ".....", vbinformation,"...."
Else
Cancel = true
End if
End sub