Page 1 of 2 12 LastLast
Results 1 to 10 of 18

How to disable or remove Scroll bar located at right side of Excel?

This is a discussion on How to disable or remove Scroll bar located at right side of Excel? within the Excel Questions forums, part of the Question Forums category; How to disable or remove Scroll bar located at right side of Excel?...

  1. #1
    Board Regular
    Join Date
    Feb 2011
    Posts
    196

    Default How to disable or remove Scroll bar located at right side of Excel?

    How to disable or remove Scroll bar located at right side of Excel?

  2. #2
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,537

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    Try

    Code:
    ActiveWindow.DisplayVerticalScrollBar = False
    HTH, Peter
    Please test any code on a copy of your workbook.

  3. #3
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    East Sussex
    Posts
    23,094

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    You can also turn it off in the Options. For 2007 and later it's in the Advanced section; for 2003 and prior it's in the View tab.

  4. #4
    Board Regular
    Join Date
    Feb 2011
    Posts
    196

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    Quote Originally Posted by VoG View Post
    Try

    Code:
    ActiveWindow.DisplayVerticalScrollBar = False
    Hi, How can I apply it in VB? :D
    If I choose in excel option all sheet will disable, I just want to disable some sheet not all.

  5. #5
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,537

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    As far as I know you cannot do that for individual sheets. You can restrict the scroll area for individual sheets:

    Code:
    Sheets("Sheet1").ScrollArea = "A1:Z20"
    HTH, Peter
    Please test any code on a copy of your workbook.

  6. #6
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    East Sussex
    Posts
    23,094

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    You could also use the activate event of the sheets to turn the scrollbar on and off.

  7. #7
    Board Regular
    Join Date
    Feb 2011
    Posts
    196

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    What is the exact code for me to lock or disable or remove the scrollbar?
    I cant make it. sorry.

  8. #8
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,537

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    Try like this in the sheet's code module (pinching Rory's idea )

    Code:
    Private Sub Worksheet_Activate()
    ActiveWindow.DisplayVerticalScrollBar = False
    End Sub
    
    Private Sub Worksheet_Deactivate()
    ActiveWindow.DisplayVerticalScrollBar = True
    End Sub
    HTH, Peter
    Please test any code on a copy of your workbook.

  9. #9
    Board Regular
    Join Date
    Feb 2011
    Posts
    196

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    Quote Originally Posted by VoG View Post
    Try like this in the sheet's code module (pinching Rory's idea )

    Code:
    Private Sub Worksheet_Activate()
    ActiveWindow.DisplayVerticalScrollBar = False
    End Sub
    
    Private Sub Worksheet_Deactivate()
    ActiveWindow.DisplayVerticalScrollBar = True
    End Sub
    I try this, :D but I can still scroll the sheet using my mouse scroller.

  10. #10
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,537

    Default Re: How to disable or remove Scroll bar located at right side of Excel?

    Then try like this

    Code:
    Private Sub Worksheet_Activate()
    ActiveWindow.DisplayVerticalScrollBar = False
    Me.ScrollArea = "A1:Z20"
    End Sub
    HTH, Peter
    Please test any code on a copy of your workbook.

Page 1 of 2 12 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com