|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Do VBA Projects remaining visible in VBAProject window after they are closed matter somehow?
This is linked to my previous post.
I open in my Excel app sequentally other workbooks (currently in same instance), do something, and then close them. After the workbook is closed, the VBAProject of closed Excel file remains displayed in VBAProject window of my App. Does this mean, that those closed files are using up some of RAM? Because the number of files to be processed this way is currently about 1000, and my App crashed after ~300 of those secondary files were processed. (As afterthought, when this is the cause, then I probably have to open all secondary files in separate instance, and to clear this secondary instance every time a secondary workbook is closed there) |
#2
|
||||
|
||||
This is not the behaviour I would be expecting. Once you close the workbook, the document should disappear from your VBA window too.
Perhaps you could post the code you are using to open and close the workbooks. You may also have other code running (eg in Personal workbook) that is doing something to your VBA environment.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
It looks like this won't affect the performance, but there is another annoying effect.
Excel (as many other applications) has a feature, where when you want to open a file, you can select from files lately opened with this program. When I run this workbook and process through ~1000 Excel workbooks in folder (without saving there anything), all those ~1000 forkbooks are listed as top of this selection list. I.e. any user who will work with this app, will get his/her latest opened workbooks list spammed with those. |
#4
|
||||
|
||||
Quote:
The single line: Application.RecentFiles(1).Delete removes the most recently added recent file entry. Perhaps you could add this line within each iteration of your loop? |
#5
|
|||
|
|||
It worked. Thanks!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2013, when switching to next window, often opens it as a tiny window | amz | Word | 1 | 04-20-2021 12:25 AM |
How to call a function in VBAProject(PERSONAL.XLSB) | coffent | Excel Programming | 0 | 05-17-2020 11:31 AM |
How to show days remaining | oliboi | Excel | 6 | 01-24-2019 10:29 AM |
Word window empty when opened minimized while Visible is False | qtutorm | Word VBA | 2 | 10-08-2018 09:10 AM |
Time Remaining Progress Bar | teza2k06 | Excel | 1 | 05-13-2014 05:41 AM |