Hello dear friends. I am a little desperate.
I have written a VBA code which should hide and show me my comment columns. Since these can change often, it is too complicated for me with my solution, because I always have to change the exact range.
Now I have come up with the idea to hide and show all columns which are grouped from column D for example.
My problem: I get it done with 2 different codes and thus 2 different buttons, but not with one button.
I have already read through everything on outline.showlevels, but have not found a solution.
In my attached file the red button should show/hide the columns F and G I and J M and N P and Q (if they are shown). I have attached my code so far, but it is too complicated for me as described above.
I would be very happy about help!!!
i just saw that i can't get the marko attached. So my manual too complicated macro so far:
![]()
Sub HideColumnsRows() If Range("F:G,I:J,M:N,P:Q").EntireColumn.Hidden = True Then 'Makes all hidden rows and columns in the active sheet unvisible. Range("F:G,I:J,M:N,P:Q").EntireColumn.Hidden = False Else Range("F:G,I:J,M:N,P:Q").EntireColumn.Hidden = True End If End Sub
Bookmarks