Using Checkboxes to Hide Individual Rows, One Atta Time, with VBA

atypicalguy

New Member
Joined
Jun 11, 2024
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hey All!

First post on this board, really impressed with and appreciate this community!

I'm coming in with near to 0 knowledge of VBA, so any and all explanations/ideas/troubleshoots are appreciated.

I've got a task list that I'm wanting to mark completions with a ticked checkbox, and once the checkbox is ticked, it hides it's row.

I've been browsing this board and have found some macros for hiding multiple rows via a single checkbox, but am having trouble coming up with a macro for individual rows with their own checkbox.

Any and all help is appreciated!
 
@Fluff That's what I thought... that's not the best option since it would involve scrolling through ~4500 rows of data to place the "yes/no" in the "Scheduled?" column.

It won't be the prettiest, but I'm thinking hiding the rows manually might be the easiest at this point 😞
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Ok, you could use this.
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
   If Not Intersect(Target, Range("B24#").Offset(, Range("B24#").Columns.Count).Resize(, 1)) Is Nothing Then
      Target.EntireRow.Hidden = True
      Cancel = True
   End If
End Sub
Place it in the code module for that sheet & when you double click in the 1st column after the spill range, that row will hide.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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