ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing/restoring toolbars (https://www.excelbanter.com/excel-programming/351898-removing-restoring-toolbars.html)

peter.thompson[_69_]

Removing/restoring toolbars
 

I am using the sub below to remove/restore toolbars. This code also
removes the horizontal scroll bar. What do I need to change to ensur
the horizontal toolbar is always visible?

Any help much appreciated.

Cheers,

Peter

Sub RemoveToolbars()
On Error Resume Next
With Application
.DisplayFullScreen = True
.CommandBars("Full Screen").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
End With
On Error GoTo 0
End Sub

Sub RestoreToolbars()
On Error Resume Next
With Application
.DisplayFullScreen = False
.CommandBars("Worksheet Menu Bar").Enabled = True
End With
On Error GoTo 0
End Su

--
peter.thompso
-----------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...fo&userid=2968
View this thread: http://www.excelforum.com/showthread.php?threadid=50666


Tom Ogilvy

Removing/restoring toolbars
 
These commands control the display of the scrollbars:

With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With

With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With


--
Regards,
Tom Ogilvy



"peter.thompson"
<peter.thompson.22hhny_1138685401.5526@excelforu m-nospam.com wrote in
message news:peter.thompson.22hhny_1138685401.5526@excelfo rum-nospam.com...

I am using the sub below to remove/restore toolbars. This code also
removes the horizontal scroll bar. What do I need to change to ensure
the horizontal toolbar is always visible?

Any help much appreciated.

Cheers,

Peter

Sub RemoveToolbars()
On Error Resume Next
With Application
DisplayFullScreen = True
CommandBars("Full Screen").Visible = False
CommandBars("Worksheet Menu Bar").Enabled = False
End With
On Error GoTo 0
End Sub

Sub RestoreToolbars()
On Error Resume Next
With Application
DisplayFullScreen = False
CommandBars("Worksheet Menu Bar").Enabled = True
End With
On Error GoTo 0
End Sub


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile:

http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=506662




peter.thompson[_71_]

Removing/restoring toolbars
 

Thanks again Tom

Cheers

Pete

--
peter.thompso
-----------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...fo&userid=2968
View this thread: http://www.excelforum.com/showthread.php?threadid=50666



All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com