• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to list modified files between two dates given

I would appreciate if you can help me
It should appear, where indicated, an almanac to choose dates 1 and 2.
Then it must show the option to choose the folder from which we want to list
the files that have been modified between the dates indicated.
Then list under the heading, titles, the files that comply with the request.
Note the files that are listed must be included within the dates, including
Thanks for your attention Callao2908
 

Attachments

Marc L

Excel Ninja
In order you start to write your code as pretty all is yet in the VBA inner help (just open it !) with some directions :​
  • If you need a box to enter a date, see InputBox, whatever the function or the method, both work.

  • Use IsDate function to check if a date input is valid …

  • To choose a folder, see Application.FileDialog(msoFileDialogFolderPicker).
Another way is to use BrowseForFolder of the Shell.Application ActiveX.​
See samples of both ways in the threads of this forum …​
  • To list a folder, use the Files collection of the GetFolder object.

  • See properties of File object for dates like creation & modification …
 
Thanks Marc, for your collaboration. Unfortunately I have never written a code, and I believe that with my 68 years, although it is never too late to learn, I will soon write one. If it is true, that I am registered in the forum many years ago, the times I have asked for your help has been because I needed the application with some urgency, from here to learn and can make the code, surely I will not need it anymore , that's why I asked for your help, believe me, but I would not have done it.
Thanks, I hope it's not a hassle, a thousand apologies
regards (Traduction with Google Traductor)
 
Thank you very much p45cal. I appreciate your help for me. I've been testing it and it works well, I just need to solve two observations:
1) The first is that it only lists the folder that I select, but not the folders that are inside it. That is, it needs to be extended so that it also considers folders and subfolders
2) When you want to list again, that is, use again, it does not erase the cells previously occupied. The new list is attached to the end of the previous list, and so on.
Again, thank you very much, I hope I can solve the problems expressed. Greetings Jorge
(Translated with Google Translator)
 

p45cal

Well-Known Member
1) The first is that it only lists the folder that I select, but not the folders that are inside it. That is, it needs to be extended so that it also considers folders and subfolders
That's not quite what you asked for! To iterate all subfolders is a new ball-game - it's possible. I will steal some code from the internet to do it it, but not right now.
2) When you want to list again, that is, use again, it does not erase the cells previously occupied. The new list is attached to the end of the previous list, and so on.
Well, I didn't know whether you wanted to keep or lose the previous search; I will add that too, but when I get the time, hopefully later today.
Someone else might jump in in the meantime.
 
Top