Hide checkboxes when hiding rows

2019-02-14 04:21发布

问题:

I have used VBA code to hide some rows. These rows are hidden when I click a check box.

The problem I have now is - the check boxes associated with each row will not hide. This also interferes with my original VBA code to hide the rows and stops working. I would like to hide these check boxes with the rows.

Please can you advise?

回答1:

You need to set the checkboxes to "Move and Size With Cells." The last time I did this, with Excel 2003 it was easy: just right-click, choose "Properties" and choose that option. Now if you try that you'll see the option, but it's disabled:

So instead you need to access the more modern-looking format menu in Excel 2007 onwards. I did it by clicking the little "more" arrow on the Drawing Tools tab's Format group. For some reason it's enabled there. Once you set it your checkbox will hide with its row:



标签: excel hide rows