VBE_Extras catch-up #6: Previous Lists
- John
- Apr 30
- 3 min read
When I first made VBE_Extras available for download, it contained a whole load of functionality that I never wrote blog posts about. I'm now setting that right for a few of the core areas of that functionality.
My bet is that few users of VBE_Extras are aware of, and regularly use, the two "Previous Lists" commands. However, they can be huge timesavers. The purpose of the Previous Lists commands is to re-show a list that has been shown previously. Clear?
No, I don't think.
Okay, say that you use, for example, the References for code at cursor command to display a dialog with a list of references of a specific declaration and then you close that dialog. You then realise that, actually, you want to see the dialog again. Perhaps your cursor is still on the same reference and getting the list of all references was quick then, of course, you can just run the References for code at cursor command again to see the same dialog with the same list. However, what if you moved your cursor elsewhere? Or what if you are working in an enormous VBA Project where there are many, many references of that declaration and the dialog took some time to identify all of the references? This is where the two Previous Lists commands are your friend ... you can ...
Use the "Show most recent Previous List" command to immediately show that dialog (and, therefore, that list) again, or
Use the "Show a Previous List" command to give you the option of selecting which dialog (and, therefore, that list) to show again
Both of these commands are available in the main menu: Extras > View > Previous Lists ... or, if you have enabled keyboard shortcuts in the VBE_Extras settings, you can use Alt+L for the "Show most recent Previous List" command or Alt+Q for the "Show a Previous List" command (all keyboard shortcuts are customisable in the VBE_Extras settings).
The Previous Lists commands don't only work with lists of references but also with lists of declarations, lists of tasks, lists of literal values and lists of calls (i.e. calls of/from a procedure).
More information about the Previous Lists commands
All information shown in the dialogs is 'as it was' when the original list was shown e.g. the numbers of declarations, references, literal values, tasks and calls and their locations (line / column numbers) are not updated if code has been edited since the dialog was originally shown … the idea is that this is a quick way of re-showing a specific dialog with a specific list. As such, some functionality is limited, for example selecting 'Go to' will go to the right location if it is available or will go to the nearest possible location otherwise (e.g. if lines have been deleted from or added to a Module).
Previous lists are stored per-Project. If you navigate to a different Project, the previous lists available will be those for that Project. Lists are not deleted when you navigate away from a Project, so you can navigate back to a Project and see the previous lists for that Project. However, Previous Lists are deleted when a Project is closed or if it is saved with a different filename or in a different folder.
There is a maximum number of each type of list that is stored. When this maximum is exceeded then the oldest lists will be automatically deleted.
Specific previous lists will be automatically deleted if they become 'invalid' for example if a Module is deleted from your Project and that list included an item that was in that Module or referred to that Module.



Comments