persistent appearance of unwanted tool palates after macro creatio

X

xppuser

hi there,

thank you first of all for any advice/help. i have recently created a macro
for my document but somehow since then whenever i launched my document or run
word (even without opening the relevant document), two tool palates (one for
exit design mode and one for control toolbox) appeared (floating) on the
workspace. if i closed it or untick in customized tool bars, they disappear
only for that instance i.e. if i close word and re-open word or if i close my
document and open them again by double-clicking the document (as oppose to
File -> Open where the palate remained closed), they will appear again. they
do not interfere with my work but i would like to know how this happened (a
bug or something i did) and how to make these palates not appear unless i
wanted to if nothing else, for my own education.

thank you,
jes
 
B

Bear

Jes:

I wish I could point you to the article where I found this code. It explains
that some component in your VBA project is in design mode. Here's code that
should find the component and exit it from design mode. That, in turn, makes
the toolboxes vanish from your documents.

Public Sub CloseDesignWindows()
Dim k As Long
With ActiveDocument.VBProject
For k = 1 To .VBComponents.Count
With .VBComponents(k)
If .HasOpenDesigner Then
MsgBox "Found in: " & .Name
.DesignerWindow.Close
End If
End With
Next
End With
End Sub

Bear
 
X

xppuser

hi bear,

thank you for your reply. don't mean to be an idiot but how do you use the
code that you supplied? is this to be grafted onto my code - if so, how and
where to paste this lines of codes, if not, how can i use these codes? would
appreciate detail explanation. though i dabble with macros, it is only with
great reluctance and mainly because i have repetitive tasks that i need to
macronized, otherwise i stayed away. the operative word is 'dabble' so i
would appreciate it if you could take me through on how to use your codes.

thanks again,
jes
 
W

Word Heretic

G'day "Bear" <[email protected]>,

I gave ya that code mate :)


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Bear reckoned:
 
W

Word Heretic

G'day "xppuser" <[email protected]>,

Caused by either of

Magic forms use
Incorrect destruction of forms

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


xppuser reckoned:
 

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