For the benefit of sujittalukde & mine the attachment included retrieves the time from the Internet (Naval Academy USA)
I thought of doing an =LEFT in B1 with the result : June. 26 (I do not know how to get rid of the dot between June and 26)
If a condition can be added to the code to the effect that if vale in B1 IS June. 26 to close the file I think that might answer the original question.