Add button to a row when cell is selected

tigerdel

Board Regular
Joined
Oct 13, 2015
Messages
145
Office Version
  1. 365
Platform
  1. Windows
I am looking for code that is still driving me mad
What I need is that when a row is selected a button is to appear in the Delete Row Column allowing the user to delete that row with the message: "Are you sure you wish to delete this row [Name Row Number] as this action cannot be undone"
The Table [ProductList] is in Sheet [Product List] and contains the following columns:
Category
Item Description
Product #
Price
Unit
VAT
Nett Price
Delete Row
I have attached the code so far as a picture and I get an error at Set tbl = ws.ListObjects("ProductList") of "Subscript out of range"

Thanks for looking
 

Attachments

  • delete code.png
    delete code.png
    208 KB · Views: 6

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I would suggest you use a sheet double click event script
Double click on any cell in column A and that row will be deleted. If your interested let me know and I will try to help
 
Upvote 1
Solution
I would suggest you use a sheet double click event script
Double click on any cell in column A and that row will be deleted. If your interested let me know and I will try to help
You marked this as a solution so show me the script you wrote that worked for you. Thanks
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,292
Members
449,149
Latest member
mwdbActuary

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