Sometimes macros shift to anothr word windw.How can I prevent that

M

Marceepoo

Sometimes, my vba Word macros (which I intended to work only on the topmost
window) shift to a second Word document window, and execute in the second
Window. Where can I find info about how to prevent that from happening?
Any suggestions would be much appreciated.

marceepoo
 
J

Jezebel

Unless your macro really needs to do things with the display, the good
approach is to make the macro work explicitly with the document and its
ranges, independent of any particular window. Ie, don't use the Selection
object.
 

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