Hi
Thanks for looking at my little problem.
I'm really new to VBA coding and can't get some rows to hide when selecting a checkbox, but after a specific name e.g. stiger or nedstyrtning.
Is there anyone who are able to help me
Regards
Hi
Thanks for looking at my little problem.
I'm really new to VBA coding and can't get some rows to hide when selecting a checkbox, but after a specific name e.g. stiger or nedstyrtning.
Is there anyone who are able to help me
Regards
With Excel file
I put the code in sheet1 where the checkbox is.
NichlasO-help-vba-code-for-checkbox-to-hide-and-unhide-rows-by-a-specific-name-test1.xlsmPlease Login or Register to view this content.
1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.
Tom
Hi Tom
Thanks for a really fast reply.
The code hides a column and not a row.
I like the code to hide/unhide when you mark with a "x" outside e.g. "Anvend lift" in column A when you use a checkbox.
Is that possible?
My bad, I had columns in my head instead of rows. Replace the code in the workbook I attached in my previous post with the following amended code to hide the row instead of column..
This will only work with row 6 when the checkbox is selected/unselected.Please Login or Register to view this content.
What if I set a mark like an X in column A and only for one group?
Stiger
Anvend arbejdsplatform
Anvend stillads, angiv stilladsklasse
Anvend stillads på skrånende tag
x Anvend lift
Anvend faldsikringsudstyr
x Etabler rækværk
Etabler afspærring
Undgå brug af personer i krankurv
Etabler trappe
Anvend platformstige
Anvend materiale- eller personhejs
Do you mean if you put an X in column A it will hide the row(s) with an X only?
yes, but I will more groups like stiger. With a different text
When I started doing this I realized that you might need a way to unhide the rows at some point so I've created 2 buttons on the sheet. One to hide rows without an X, one to unhide the rows. See if the attached is what you were wanting..
NichlasO-autofilter-and-hide-the-input-test1.xlsm
Thanks mate it look really great and a big step forward, but I need to keep the headlines and be able to add line.
And thanks for your time
I'm starting to wonder if using tables instead wouldn't be a better option in this case. That way you can just filter out (select from dropdown in header) the rows you don't want and the headers remain, and adding a row is possible.
See attached
NichlasO-autofilter-and-hide-the-input-test1 with table.xlsm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks