Insert New Checkbox into next empty cell

Haywomen

New Member
Joined
Jun 7, 2019
Messages
3
Hi,

I am looking to insert a new checkbox into the next empty cell. I can get this far, but then can't specify the properties of the box. See below:

ActiveSheet.OLEObjects.Add "Forms.CheckBox.1", Left:=1206, Top:=(Range("T" & Rows.Count).End(xlUp).Offset(1).Top) + 2.25, Width:=12, Height:=12

I want to give the checkbox the following properties:

.Caption = ""
.Value = xlOff '
.LinkedCell = Range("T" & Rows.Count).End(xlUp).Offset(1)
.Display3DShading = False

If I then introduce a filter to the headings of the columns, will the checkboxes reorder if I change the order of another column?

Thank you
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I would also like to know if there is a way to get the checkboxes to move with their associated row when using filters and sorting.
 
Upvote 0
While your code adds an ActiveX checkbox, it tries to set the Value property with a constant used for a Form checkbox. For an ActiveX checkbox, the Value property is set using True or False. Also, unlike a Form checkbox, an ActiveX checkbox does not have a property called Display3DShading. Can you please confirm whether you in fact want to add a checkbox from the Form controls or the ActiveX controls?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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