How to Completely Hide Checkboxes in Hidden Excel Rows
Question details
The user needs to make checkboxes completely invisible when the Excel rows containing them are hidden using VBA.
- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Hiding rows that contain form controls (checkboxes) via VBA macros or standard filtering.
- Observed behavior
- Even when checkboxes are set to 'move and size with cells', a small part of each checkbox remains visible when the row is hidden.
Ensure your checkboxes are already configured to 'Move and size with cells' in their Format Control properties. If they are set to 'Don't move or size with cells', they will float over hidden rows regardless of their size.
Resize Checkboxes to be Smaller than the Cell
The most efficient method is to manually adjust the checkbox shape so its entire bounding box fits strictly inside the cell's borders.
When a checkbox overlaps the border of a cell even slightly, Excel fails to reduce its height to exactly zero when the row is hidden. Making the control's bounding box smaller than the cell eliminates the need for complex VBA workarounds.
Hold down the 'Ctrl' key and click on the checkbox to select it without triggering the checkmark.
Click and drag the sizing handles (the small circles around the checkbox) inward.
Ensure that the entire outline of the checkbox is strictly inside the cell boundaries, not touching any gridlines.
Run your VBA script or manually hide the row to confirm the checkbox is now completely hidden.

Hide Checkbox Controls Directly via VBA
If resizing is not an option due to layout constraints, use VBA to toggle the Visible property of the checkbox shapes when the rows are hidden.
Easily Manage Checkboxes and Macros with WPS Office
WPS Spreadsheet offers full compatibility with Excel files, including form controls like checkboxes and VBA macros. You can easily adjust control properties to ensure they hide perfectly with their underlying cells.
- 1. Insert a Checkbox: Open your file in WPS Spreadsheet. Go to the 'Insert' tab, select 'Forms', and click on the 'Checkbox' icon to draw it in a cell.
- 2. Modify Object Properties: Right-click the checkbox, select 'Format Object', and navigate to the 'Properties' tab.
- 3. Set Positioning: Choose 'Move and size with cells' to ensure the checkbox reacts correctly when rows are hidden or filtered.
- 4. Run your Macros: Use the built-in VBA environment in WPS Office to execute your row-hiding scripts flawlessly.

Frequently Asked Questions
Why do my Excel checkboxes bunch up when filtering or hiding rows?
This happens when the object positioning is set to 'Don't move or size with cells' or 'Move but don't size'. To fix this, right-click the checkbox, select Format Control > Properties, and choose 'Move and size with cells'.
How do I select multiple checkboxes to resize them at once?
You can select multiple checkboxes by holding the 'Ctrl' key while clicking each one. Alternatively, go to the Home tab, click Find & Select, choose 'Select Objects', and drag a selection box over all the checkboxes you want to adjust.
Can I link a checkbox to a specific cell value?
Yes. Right-click the checkbox, select 'Format Control', and navigate to the 'Control' tab. Click inside the 'Cell link' field and select the cell where you want the TRUE/FALSE value to appear.




