.
The following works great for counting number of .JPG files in a folder :
Please Login or Register to view this content.
I need to implement it or something similar within a Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) event.
If the number of .JPG files exceeds 20, then the user needs to be informed and then exit until the folder contains 20 or fewer .JPG files.
I've attempted to call the above macro first - outside of the Worksheet_BeforeDoubleClick but of course when the macro exits ... it simply continues on
with the remainder of the code in the Worksheet_BeforeDoubleClick.
I've tried placing some of the code within the Worksheet_BeforeDoubleClick .... BUT, it constantly exits if there are 5 files, 20 files or 21 files. It makes no difference.
Anyone have a resource or a suggestion ?
Thank you for your time.
Bookmarks