Macro to add a new row with a checkbox

mwilburn

New Member
Joined
Jul 31, 2018
Messages
13
Good afternoon,

I am trying to create a macro that will insert a new row at the bottom of a table and add a checkbox to it. The goal is if a user needs to add 2 or 3 lines, they could run this macro 2 or 3 times. Thanks in advance!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
With this macro you add a row to Table1.
I do not understand why you need the checkbox, could you explain it?


Code:
sub AddRow
ActiveSheet.ListObjects("[COLOR=#0000ff]Table1[/COLOR]").ListRows.Add AlwaysInsert:= True
end sub
 
Upvote 0
With this macro you add a row to Table1.
I do not understand why you need the checkbox, could you explain it?


Code:
sub AddRow
ActiveSheet.ListObjects("[COLOR=#0000ff]Table1[/COLOR]").ListRows.Add AlwaysInsert:= True
end sub


I've actually adjusted my sheet but here is what I am trying to do.

I have a section of my worksheet that contains a header row and several items, it's 7 rows by 10 columns. I need to create a button connected to a macro that adds a row either at the bottom or top of that section that, keeps my formatting, and adjust my formulas in the top right two cells. The checkbox I was going to us is now just a character but I need the newly created row to contain the macro that allows that character to change from a box to a checked box as well as the conditional formatting associated with it. This sounds WAY more confusing than it is and I am SURE that is my fault. I will attempt to ad an image.
 
Upvote 0
146229021@N03
 
Upvote 0
I cannot get the image to work. I am obviously computer illiterate today.

dateposted-friend
2enqnPd
https://flic.kr/p/2enqnPd
 
Upvote 0
Can you record a couple of macros for each of the insert row options that you handle? copy those macros and paste here
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
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