Hello,
I have been to many posts so farin 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 :
and this one:Sub Auto_Open() Dim cb As CommandBar For Each cb In CommandBars cb.Enabled = False Next cb End Sub
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!
Sorry, in this post you can find out the attachment.
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.
Can we lock the toolbars (all of them)? I don't want users to un-protect my sheet and edit.
If it's password protected, then the toolbars are irrelevant surely?
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?
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!![]()
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.
Thanks Andy, That really helped me.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks