Hi,
I currently have a button with a macro (see below) which unhides row 65, is there any way this can be adapted so that it unhides row 65 but also hides rows 66:85 ?
Thank you!!
![]()
Please Login or Register to view this content.
Hi,
I currently have a button with a macro (see below) which unhides row 65, is there any way this can be adapted so that it unhides row 65 but also hides rows 66:85 ?
Thank you!!
![]()
Please Login or Register to view this content.
Last edited by 6StringJazzer; 06-22-2023 at 08:10 AM. Reason: please use code tags
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Do not use Select, unless you need the user to see that something has been selected.
Your code is based on code from the macro recorder. Here is a more efficient method.
![]()
Please Login or Register to view this content.
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
Thank you very much
Hi - sorry this doesn't seem to work..... any idea what I could be doing wrong? Thanks
Hello, I'm very new here, and I'm still learning how to use Excel VBA.
I have a code I use to do a very similar thing.
Please tell me if it doesn't work.![]()
Please Login or Register to view this content.
Sorry there was a paste error in the code. Here is a sample file with the correct code.
Your original post said "which unhides row 65," but your code actually hides it if is visible, and unhides it if it is hidden. That is what my code does. In addition, it unhides 66:85 if 65 is hidden, and hides 66:85 if 65 is unhidden.
![]()
Please Login or Register to view this content.
Working great now!! Thank you so much.
If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."
If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.
Hi,
Sorry I'm still struggling here. I've had to change the requirement slightly and need non contiguous rows to unhide, so row 67, and 69-89. So it would leave row 68 hidden.
Are you able to help at all?
Thanks
Danielle
The code is explicit about which rows it acts on. If you need to use different rows, just change 65 to 67, 66 to 69, and 85 to 89.
Thanks - my brain is fried, no idea why I couldn't figure this out formyself!!
Appreciate your help!
Danielle
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks