
Tips.Net > WordTips Home > Macros > VBA Examples > Determining How Many Windows are Open
Summary: For your VBA macro to work properly, you may need to determine how many document windows are open. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
It is sometimes helpful for your macro to know how many document windows are open at any given time. You can determine the number of open windows by using the Count property of the Windows object. This is done using the following syntax:
X = Windows.Count
After executing the line, X is equal to the number of open windows.
Tip #735 applies to Microsoft Word versions: 97 2000 2002 2003
Find and Replace Almost Anything! An invaluable resource for learning how to harness the full power of Word's search and replace capabilities. You'll discover everything you need in order to master all the intricacies of finding and replacing elements of your document, including the super-powerful ?wildcard searches? available in Word.
Check out WordTips: Find and Replace today!
Thousands of WordTips, available for immediate download. Have all the Microsoft Word info you need, right at your fingertips. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips