

For hiding or displaying certain rows such as row 6:9, please change the. EntireColumn means that the column C and D will be hide or unhide by checking or unchecking the corresponding checkbox.Ģ. VBA code: Use checkbox to hide/unhide rows or columns Private Sub CheckBox1_Click()

In the Microsoft Visual Basic for Applications window, copy and paste the following VBA code into the Code window. After inserting an Active X Control checkbox to the worksheet, right click on the checkbox and then select View Code from the right-clicking menu. The following VBA code can help you hide/unhide certain rows or columns with checkbox.ġ. Use checkbox to hide/unhide rows or columns with VBA code This article shows you the method of how to use checkbox to hide/unhide rows or columns in Excel with details. For example, when the Active X Control checkbox is checked, the certain rows or columns are displayed, otherwise, they will be hidden. Supposing you need to use a checkbox to hide or unhide certain rows or columns. How to use checkbox to hide/unhide rows or columns in Excel?
