Problems deleting tollbar

A

arne

'I want to make a new toolbar, and delete it. Problem is that it seems to be
deleted ,but
'every time I restart word it is back. If I run Sub createmytoolbar() 6
times it gives me 6
'toolbars after restart of Word ! The only way I can kill them is to delete
normal.dot!
'In word200, normal.dot i have created this

Sub createmytoolbar()
Application.CustomizationContext = NormalTemplate
Dim cBar As CommandBar
For Each cBar In Application.CommandBars 'ActiveDocument.CommandBars
If cBar.Name = "Mine" Then
MsgBox "Mine is there"
cBar.Delete
End

End If
Next cBar
MsgBox "We must make Mine!"
Call createmine
End Sub

Sub createmine()
MsgBox "Then iI have a routine for creating and it seems to work"
' routine
End Sub

What am I doing wrong??

arne
 
A

Andra

did you get 6 times "We must make Mine!" or 6 times "Mine is there", or
what?

arne wrote
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top