+ Reply to Thread
Results 1 to 3 of 3

Removing/restoring toolbars

  1. #1
    Forum Contributor
    Join Date
    12-16-2005
    Posts
    161

    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 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

  2. #2
    Tom Ogilvy
    Guest

    Re: 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"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  3. #3
    Forum Contributor
    Join Date
    12-16-2005
    Posts
    161

    Thanks

    Thanks again Tom

    Cheers

    Peter

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1