View Full Version : delete all user made toolbars
lior03
04-20-2006, 10:10 AM
hello
is it possible to delete all user made namely all unbueiltin toolbars at one stroke once i want to close a workbook?
thanks
Bob Phillips
04-20-2006, 10:29 AM
Sub DeleteCustomToolbars()
Dim ocb As CommandBar
For Each ocb In Application.CommandBars
If Not ocb.BuiltIn Then
ocb.Delete
End If
Next ocb
End Sub
Jan Karel Pieterse
04-20-2006, 10:30 AM
Like this:
Sub RemoveUserBars()
Dim oBar As CommandBar
For Each oBar In Application.CommandBars
If Not oBar.BuiltIn Then
oBar.Delete
End If
Next
End Sub
geekgirlau
04-20-2006, 08:45 PM
Snap! And it's xld in front by a nose hair :funnyashe
Jan Karel Pieterse
04-20-2006, 09:54 PM
Darn, I would have won would I have been using my normal DSL connection @ 4 mb iso my current 150 K wireless mobile <g>.
johnske
04-20-2006, 11:08 PM
Bob's pretty hard to beat in the speed department, the difference was probably the extra time you spent to type the two words "Like this:" :rotlaugh:
Bob Phillips
04-21-2006, 03:21 AM
I don't waste words, but Jan Karel had a better variable name :yes
Jan Karel Pieterse
04-21-2006, 04:06 AM
You can expect me to raise the Bar anytime <g>
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.