PDA

View Full Version : Solved: Delete (not hide) Excel Window



MWE
02-08-2006, 05:41 PM
This is not really a VBA question, but it happened to a VBA appl, so ...

I have an Excel application (A.xls) with a small amount of VBA behind the scenes. When the application is opened, there are two instances or windows; one is A.xls:1 and the other is A.xls:2 Clearly at some point, I mistakenly created a 2nd window for this application. I can used the hide command to hide the 2nd copy, but I would rather delete it. How do I do that?

Thanks

XLGibbs
02-08-2006, 05:47 PM
Make sure that any On_Open macros are stored in the primary file. In some cases, if the macro is not properly identified (such as some toolbar assignments if developed with >Customize)..It may be opening up the second file to run a macro in that file (even though it may appear in the original).

I would think rather than finding a way to delete the second instance, it more prudent to diagnose why it is created.....possible that the 2nd one is a renamed version of Personal.xls ? that may be opening with the application? I have seen this before as well....

MWE
02-08-2006, 05:53 PM
Make sure that any On_Open macros are stored in the primary file. In some cases, if the macro is not properly identified (such as some toolbar assignments if developed with >Customize)..It may be opening up the second file to run a macro in that file (even though it may appear in the original).

I would think rather than finding a way to delete the second instance, it more prudent to diagnose why it is created.....possible that the 2nd one is a renamed version of Personal.xls ? that may be opening with the application? I have seen this before as well....
Thanks for the very fast reply. I know what I did; I created the new window when my finger slipped off the mouse on its way to freeze/unfreeze. The two windows are "identical". It appears that everything else is fine. If I hide the 2nd window, save and close the file and then open it, there is only one window. It seems a bit strange that one can easily create a new window but not delete it.

XLGibbs
02-08-2006, 05:56 PM
http://vbaexpress.com/forum/images/smilies/ohhmygosh.gif

We all been there and done that. Just mark this puppy solved..glad you figured it out.

Zack Barresse
02-08-2006, 05:56 PM
You have created a version of the same file in a new window (Window | New Window). If you don't want the other one, just close it as you would a regular file. It's the same file though.. It's used for viewing more than one worksheet in a workbook simultaneously.

Edit: Wow! You guys were fast! LOL!

MWE
02-08-2006, 06:06 PM
You have created a version of the same file in a new window (Window | New Window). If you don't want the other one, just close it as you would a regular file. It's the same file though.. It's used for viewing more than one worksheet in a workbook simultaneously.

Edit: Wow! You guys were fast! LOL!
Thanks for your response. My brain must be getting very soft (or maybe it is getting hard with age). The answer is stupidly obvious; just close the window and that instance is gone. What makes matters worse is that I have used multiple windows in the past for their intended purposes. But it seems to me that there was a "delete window" option somewhere. Thank goodness there is not a Delete User menu pick :devil:

Let's all make believe that this thread never existed ...

Zack Barresse
02-08-2006, 06:40 PM
Thank goodness there is not a Delete User menu pick :devil:
ROFL!!


Let's all make believe that this thread never existed ...
ROFLMFAO!!! Reminds me of the penguins from Madagascar the movie. LOL!

XLGibbs
02-08-2006, 06:42 PM
Cute and Cuddly boys, Cute and cuddly.....