+ Reply to Thread
Results 1 to 10 of 10

Thread: Hiding Toolbar in Excel 2007

  1. #1
    Registered User
    Join Date
    03-04-2010
    Location
    hkjhkjhjk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Arrow Hiding Toolbar in Excel 2007

    Hello ,

    I have been to many posts so far in this forum but could not get the exact working code to hide all toolbars except my own. For convenience, attached is the excel file that I m currently working on.

    Please let me know if you anything about hiding all toolbars in Excel 2007.

    I found out this code :

    Sub Auto_Open()
    Dim cb As CommandBar
        For Each cb In CommandBars
            cb.Enabled = False
        Next cb
    End Sub
    and this one:

    Private Sub Workbook_Open()
    
        ' Dimension a loop variable.
        Dim i As Integer
        ' Loop through the total number of toolbars.
        For i = 1 To Application.Toolbars.Count
            ' Hide each toolbar.
            Application.Toolbars(i).Visible = False
        ' End of loop.
        Next i
    
    End Sub

    Any sort of help will be appreciated. Best!

  2. #2
    Registered User
    Join Date
    03-04-2010
    Location
    hkjhkjhjk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Hiding Toolbar in Excel 2007

    Sorry, in this post you can find out the attachment.
    Attached Files Attached Files

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Hiding Toolbar in Excel 2007

    I don't think it will work if you are using an xls file, rather than a 2007 format - you can hide the entire ribbon using VBA but not parts of it.

  4. #4
    Registered User
    Join Date
    03-04-2010
    Location
    hkjhkjhjk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Hiding Toolbar in Excel 2007

    Can we lock the toolbars (all of them)? I don't want users to un-protect my sheet and edit.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Hiding Toolbar in Excel 2007

    If it's password protected, then the toolbars are irrelevant surely?

  6. #6
    Registered User
    Join Date
    03-04-2010
    Location
    hkjhkjhjk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Hiding Toolbar in Excel 2007

    Thanks romper. I appreciate it. Can you also enlighten me with this:
    http://www.andypope.info/vba/ribboneditor.htm
    What I know is that this is something with which you can customized your own toolbar. Anymore hints?

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Hiding Toolbar in Excel 2007

    Yes, but it won't work with an xls file, as I mentioned earlier. You have to be using a 2007 format file.
    Andy Pope, the creator, is active here, so if you're lucky he may chime in too!

  8. #8
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    263

    Re: Hiding Toolbar in Excel 2007

    To edit the toolbars in 2007, you would need the use of XML and some form of XML editor. The last time I played around with them ribbons, I used these websites as references.

    Part 1

    Part 2

    Part 3

    Part 4

    Epilogue.

    Hope this helps.

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,351

    Re: Hiding Toolbar in Excel 2007

    If the file is a xls (2003) version then you will not be able to control the ribbon in the same was as you did commandbars.

    As RS has suggested passwording will resolve your problem.

    If you create a xlsm of your file then you can use Startfromscratch to remove all tabs and build your own custom one.
    Cheers
    Andy
    www.andypope.info

  10. #10
    Registered User
    Join Date
    03-04-2010
    Location
    hkjhkjhjk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Hiding Toolbar in Excel 2007

    Thanks Andy, That really helped me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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