+ Reply to Thread
Results 1 to 3 of 3

Identifying Visible Toolbars

  1. #1
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Identifying Visible Toolbars

    I want to be able to de-select all toolbars for the user of a file and, when the project is complete, re-select the toolbars they originally had visible.

    I have a routine (at work, unfortunately) that will de-select all toolbars, but I don't have anything that will set the visible toolbars back to their original state.

    Any quick code for this?
    Thanks!
    Dennis

    I am using Windows 7 and Office 2007, all of my posts are based on this.

  2. #2
    Tom Ogilvy
    Guest

    Re: Identifying Visible Toolbars

    Loop through your list of commandbars (which you made when you made them not
    visible) that were visible and set their visible property to true.

    Should be almost identical to the code you have.

    --
    regards,
    Tom Ogilvy

    "DCSwearingen" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I want to be able to de-select all toolbars for the user of a file and,
    > when the project is complete, re-select the toolbars they originally
    > had visible.
    >
    > I have a routine (at work, unfortunately) that will de-select all
    > toolbars, but I don't have anything that will set the visible toolbars
    > back to their original state.
    >
    > Any quick code for this?
    >
    >
    > --
    > DCSwearingen
    >
    >
    > ------------------------------------------------------------------------
    > DCSwearingen's Profile:

    http://www.excelforum.com/member.php...o&userid=21506
    > View this thread: http://www.excelforum.com/showthread...hreadid=497189
    >




  3. #3
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Identifying Toolbars

    Here is the code I came up with. It can probably be trimmed down by someone more experienced than myself.


    Option Base 1
    Global myArray(50, 2)

    Sub HideToolbars()
    Dim myCount As Single, myState As Boolean, i As Integer
    For i = 1 To Toolbars.Count
    myCount = i
    myState = Toolbars(i).Visible
    myArray(i, 1) = myCount
    myArray(i, 2) = myState
    Toolbars(i).Visible = False
    Next
    End Sub

    Sub RestoreToolbars()
    Dim i As Integer
    For i = 1 To Toolbars.Count
    Toolbars(i).Visible = myArray(i, 3)
    Next
    End Sub

    Thanks again to everyone who answers questions posted.

+ 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