Forum Discussion

ColinMac2180's avatar
ColinMac2180
Copper Contributor
Nov 05, 2020

Scroll Bars

I have inserted a number of scroll bars on a worksheet. These roughly run across columns C and D and are on rows 4,6,8 etc. Is there a way to unhide/hide all the scroll bars at once? Hiding or grouping the columns doesn't hide them.

 

Thanks

3 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    ColinMac2180 

    Many ways lead to a solution ... that is the good and at the same time complex in Excel :).

    You can also toggle on and off with VBA code:

    In the code module of the corresponding task sheet (right click on the table name in the sheet register, "Show code"):

     

    Private Sub Worksheet_Activate()
    ActiveWindow.DisplayHorizontalScrollBar = False
    ActiveWindow.DisplayVerticalScrollBar = False
    End Sub
    
    Private Sub Worksheet_Deactivate()
    ActiveWindow.DisplayHorizontalScrollBar = True
    ActiveWindow.DisplayVerticalScrollBar = True
    End Sub

     

     

    I would be happy to know if I could help.

     

    Nikolino

    I know I don't know anything (Socrates)

    * Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

    • ColinMac2180's avatar
      ColinMac2180
      Copper Contributor

      Thanks for this NikolinoDE but I'm not referring to the horizontal and vertical scroll bars.  Instead, I'm talking about scroll bar form controls that are on the worksheet.

Resources