+ Reply to Thread
Results 1 to 2 of 2

Application.CommandBars Help

  1. #1
    Forum Contributor
    Join Date
    01-19-2006
    Posts
    142

    Question Application.CommandBars Help

    Hello,

    I have the following code;

    Please Login or Register  to view this content.
    The code above seems to work fine, it removes all command bars from the excel application.....but when I activate other sheets a grey box (toolbar box - when I right-click it promts 'customize') appears at the top of my excel sheets that covers the top of the vertical scroll bar and can look untidy - why does this appear after selecting other sheets, and how do I get rid of it?

    TIA
    Last edited by gti_jobert; 06-14-2006 at 07:22 AM.

  2. #2
    Jim Thomlinson
    Guest

    RE: Application.CommandBars Help

    Does that code hide the command bars? I see bar.eneabled = True which enables
    the bar, but nothing to hide the bar... (bar.visible = false). Not to mention
    how do you get the original bars back at the end with this code since you do
    not store the bar indecies or names anywhere???
    --
    HTH...

    Jim Thomlinson


    "gti_jobert" wrote:

    >
    > Hello,
    >
    > I have the following code;
    >
    >
    > Code:
    > --------------------
    >
    > Private Sub Workbook_Open()
    > Sheets("Menu").Activate
    > Range("C7").Select
    >
    > If Application.UserName = "xxxxxx" Then
    > ActiveWindow.DisplayWorkbookTabs = False
    > For Each bar In Application.CommandBars
    > bar.Enabled = True
    > Next
    > With Application
    > .DisplayFormulaBar = False
    > End With
    > End If
    > End Sub
    >
    > --------------------
    >
    >
    > The code above seems to work fine, it removes all command bars from the
    > excel application.....but when I activate other sheets a grey box
    > (toolbar box - when I right-click it promts 'customize') appears at the
    > top of my excel sheets that covers the top of the vertical scroll bar
    > and can look untidy - why does this appear after selecting other
    > sheets, and how do I get rid of it?
    >
    > TIA
    >
    >
    > --
    > gti_jobert
    > ------------------------------------------------------------------------
    > gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
    > View this thread: http://www.excelforum.com/showthread...hreadid=551810
    >
    >


+ 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