Hide Scrollbars
I'm trying to hide the horizontal and vertical scrollbars on a worksheet with
DisplayHorizontalScrollBar = False DisplayVerticalScrollBar = False but it's not working. Any ideas? -- Message posted via http://www.officekb.com |
Hide Scrollbars
hi
with activewindow .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False end with regards FSt1 "blackbox via OfficeKB.com" wrote: I'm trying to hide the horizontal and vertical scrollbars on a worksheet with .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False but it's not working. Any ideas? -- Message posted via http://www.officekb.com |
Hide Scrollbars
here's all the code, everything worksexcept the scrollbars
Sub RemoveToolbars() On Error Resume Next With ActiveWindow .DisplayFullScreen = False .CommandBars("Full Screen").Visible = False .CommandBars("MyToolbar").Enabled = False .CommandBars("MyToolbar").Visible = False .CommandBars("Worksheet Menu Bar").Enabled = False .CommandBars("Formatting").Visible = False .CommandBars("Standard").Visible = False .CommandBars("Reviewing").Visible = False ActiveWindow.DisplayHeadings = False .DisplayFormulaBar = False .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False End With On Error GoTo 0 End Sub -- Message posted via http://www.officekb.com |
Hide Scrollbars
hi.
I copied your code and it worked on my pc. using xp xl2003. I changed all of the falses to trues and it put everything back. so i am now officially stumped. Sorry FSt1 "blackbox via OfficeKB.com" wrote: here's all the code, everything worksexcept the scrollbars Sub RemoveToolbars() On Error Resume Next With ActiveWindow .DisplayFullScreen = False .CommandBars("Full Screen").Visible = False .CommandBars("MyToolbar").Enabled = False .CommandBars("MyToolbar").Visible = False .CommandBars("Worksheet Menu Bar").Enabled = False .CommandBars("Formatting").Visible = False .CommandBars("Standard").Visible = False .CommandBars("Reviewing").Visible = False ActiveWindow.DisplayHeadings = False .DisplayFormulaBar = False .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False End With On Error GoTo 0 End Sub -- Message posted via http://www.officekb.com |
Hide Scrollbars
Well, the plot thickens...
I just tried the same code at home (Office XP) and it hides the row/column headers and the scrollbars but nothing else. I checked to make sure the menu bars and command bars all have the same names, which they do, as what ever version of Office they use at work. ('97 I think) So... I'm not quite sure where to go from here. I have a copy of Office 2007 but have been hesitant to install it due to all complaints about running slow or crashing when macros are run. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200706/1 |
Hide Scrollbars
Remove the On Error Resume Next to see the real cause of the error.
Hint: Is a CommandBar a member of the ActiveWindow ? NickHK "blackbox via OfficeKB.com" <u20390@uwe wrote in message news:73e8f7f1638cf@uwe... Well, the plot thickens... I just tried the same code at home (Office XP) and it hides the row/column headers and the scrollbars but nothing else. I checked to make sure the menu bars and command bars all have the same names, which they do, as what ever version of Office they use at work. ('97 I think) So... I'm not quite sure where to go from here. I have a copy of Office 2007 but have been hesitant to install it due to all complaints about running slow or crashing when macros are run. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200706/1 |
Hide Scrollbars
thanks for all your help.
I moved the scrollbar instructions to the top of the list and everything works NickHK wrote: Remove the On Error Resume Next to see the real cause of the error. Hint: Is a CommandBar a member of the ActiveWindow ? NickHK Well, the plot thickens... [quoted text clipped - 9 lines] I have a copy of Office 2007 but have been hesitant to install it due to all complaints about running slow or crashing when macros are run. -- Message posted via http://www.officekb.com |
All times are GMT +1. The time now is 10:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com