How To Loop Through Files To Automate ANYTHING - Excel VBA Basics Series

  Рет қаралды 5,400

Excel For Freelancers

Excel For Freelancers

Күн бұрын

Пікірлер: 39
@ExcelForFreelancers
@ExcelForFreelancers 14 күн бұрын
🎄 𝗦𝗮𝘃𝗶𝗻𝗴𝘀 𝗔𝘀 𝗕𝗿𝗶𝗴𝗵𝘁 𝗔𝘀 𝗖𝗵𝗿𝗶𝘀𝘁𝗺𝗮𝘀 𝗟𝗶𝗴𝗵𝘁𝘀 - 𝗨𝗽 𝗧𝗼 𝟱𝟱% 𝗪𝗮𝗶𝘁𝗶𝗻𝗴 𝗙𝗼𝗿 𝗬𝗼𝘂! 👉 www.excelforfreelancers.com/XmasSale2024_YTPinnedComm
@ExcelForFreelancers
@ExcelForFreelancers 29 күн бұрын
⚡ 𝗦𝗜𝗠𝗣𝗟𝗜𝗙𝗬 𝗖𝗢𝗠𝗣𝗟𝗘𝗫 𝗘𝗫𝗖𝗘𝗟 𝗧𝗔𝗦𝗞𝗦 𝗜𝗡𝗦𝗧𝗔𝗡𝗧𝗟𝗬 𝗪𝗜𝗧𝗛 𝗘𝗫𝗖𝗘𝗟 𝗔𝗜 𝗧𝗢𝗢𝗟𝗣𝗔𝗖𝗞 𝗔𝗗𝗗-𝗜𝗡 👉 www.excelforfreelancers.com/ai-toolpack
@rb-today
@rb-today 3 ай бұрын
Hi Randy, Thanks for this training. I use the FSO object to create backups of my files. I can check if the path exists & create a new path with date & time stamp, if required. I learn something from your videos that I can adapt to my code. I'm looking into making backups for my backups on another drive. Then over writing the older files. (I'm retired and I think of projects to keep my mind active.)
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi Robert, thanks so much for sharing and this is a great idea. No doubt having backups is essential and you can run the macro on a recurring basis so its more of a 'set it and forget it' type of task. I hope this helps and thanks so much.
@didiertheunpreditable4763
@didiertheunpreditable4763 2 ай бұрын
Hi Randy, thanks so much. I really appreciate1
@ExcelForFreelancers
@ExcelForFreelancers 2 ай бұрын
For sure, you are very welcome and I am happy to help and share
@ranilan00
@ranilan00 3 ай бұрын
Just created a loop like that this afternoon! Can't wait to learn things I missed ❤
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Oh Excellent. I am sure you will love this training. Thanks again for your continued support.
@nerenlakhraj5252
@nerenlakhraj5252 3 ай бұрын
Hi Randy ... Always a new learning experience ... Thank you
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Great, thanks so much Neren. I am so happy that you still find value, even in these Basic VBA videos. I always appreciate so many years of support. Thanks again
@drojanprojectchannel
@drojanprojectchannel 3 ай бұрын
Hi there Randy .. good to learn new vba lesson from you again. Thank you for emailing me always
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
For sure, you are very welcome and I am happy to help and share. I am glad you enjoyed it
@Sancarn
@Sancarn 3 ай бұрын
Hi Randy, Love how you're creating so much VBA content. A suggestion: You might want to indent the code in your subs, especially if you're making tutorials for people online. What are your thoughts?
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi and thanks so much. Almost all of my code is indented. I do like to keep it organized. If you want to view the code in a color coded and fully-organized method. that is also automated with my PDF codebooks on my Patreon platform each week www.patreon.com/ExcelForFreelancers I hope this helps and thanks so much.
@Sancarn
@Sancarn 3 ай бұрын
@@ExcelForFreelancers Interesting that you provide codebooks to your patreons :) I'm not really a consumer of this type of content, I maintain VBA libraries mainly on github :) E.G. stdVBA. It was just something I noticed 😁
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Ah no worries at all. I also create an updated training, template and resources on Patreon as well. I have a few hundreds videos right here on KZbin as well. Thanks again
@abouyoussef555
@abouyoussef555 3 ай бұрын
thanks sir.... the best to learn step by step
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Thank you so very much, I really appreciate that and I am so glad you like it
@analistaribeiro
@analistaribeiro 3 ай бұрын
When I saw 'FileName = Dir(FolderPath &"*.")' I thought 'FileName' receives JUST first one file and had to be incremented, but NOT! Would you explain this?
@ymgexcel9499
@ymgexcel9499 3 ай бұрын
When making videos in one go, inaccuracies will happen. 'FileName = Dir(FolderPath & "*.*")' means the first file name is retrieved. Then in the loop, when 'FilelName = Dir' the next file name is retrieved. You can easily prove the latter by using 'Debug.Print "Current: " & FileName' before the line, and 'Debug.Print "Next: " & FileName' after the line.
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
@ymgexcel9499 explained it perfectly. It loops through the entire folder looking for all files that match the criteria. With the last line FileName = Dir its cleared and retrieved the next and will continue until FileName is nothing. It works quite beautifully. Thank you for your Likes, Shares & Comments. It really helps.
@abdulsafwan711
@abdulsafwan711 3 ай бұрын
is that possible to list all extension, like filter
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
HI and thanks. yes for sure. You can add the filter such as "*.pdf" and then you can list them on a sheet, incrementing the rows such as Sheet1.Range("A" & RowNumb).value = Dir(FileName) RowNumb = RowNumb + 1 So just add that into the loop I hope this helps and thanks so much.
@hectordominguez7143
@hectordominguez7143 3 ай бұрын
Is this possible in a sharepoint location?
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi and thanks Yes sure it is. To share and sync your macro-enabled Excel workbook, please watch this training: kzbin.info/www/bejne/fWq5onltrrNjhdE
@Chem.digital.study_tools
@Chem.digital.study_tools 3 ай бұрын
Hello do u knw how to use Vba to use windows speech recognition
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi and thanks so much. I have not worked with speech recognition however I will check it out. It is an interesting and helpful concept. Thank you for your Likes, Shares & Comments. It really helps.
@Chem.digital.study_tools
@Chem.digital.study_tools 3 ай бұрын
@@ExcelForFreelancers pls revisit it
@henkvinck888
@henkvinck888 3 ай бұрын
Whaaaaauw Thnx Randy
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Thank you so very much, I really appreciate that Henk. I know this one is very basic for you, but the refresher may help. Thank you for your Likes, Shares & Comments. It really helps.
@danp6101
@danp6101 3 ай бұрын
I use this to delete my temp folders, cookies and other useless stuff.
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Oh yes that is a great idea. Its an awesome way to do a massive # of tasks with files and folders. (one of the best in my opinion) Thank you for your Likes, Shares & Comments. It really helps.
@abouyoussef555
@abouyoussef555 3 ай бұрын
Wait impatianly..
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Thanks so much. You will love this one. Thank you for your Likes, Shares & Comments. It really helps.
@henkvinck888
@henkvinck888 3 ай бұрын
Hello Randy, I see on the news bulletin huge devastation in China and Vietnam. I hope all goes well with your family and friends and that once again it is propaganda.
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi Henk thanks so much for the concern. The storm was quite north of me, in Hanoi and norhern area. Here in central Da Nang, the weather has been quite nice, not nearly any rain at all. Thanks again for your kind concern
@chrisk.9765
@chrisk.9765 3 ай бұрын
e.g.. fileName = Dir(folderPath & "*.xml") Do While fileName "" fileNum = FreeFile Open folderPath & fileName For Input As #fileNum fileContent = Input$(LOF(fileNum), fileNum) Close #fileNum ... ... Loop
@ExcelForFreelancers
@ExcelForFreelancers 3 ай бұрын
Hi Chris, Thanks so much for sharing and great to have you here
VBA Basics: How To Print To PDF Correctly - EVERY TIME
24:22
Excel For Freelancers
Рет қаралды 6 М.
How To Automate Outlook Appointments & Meetings With Excel VBA
22:51
Excel For Freelancers
Рет қаралды 4,6 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
How To Manipulate Files & Folders With Excel VBA For Beginners
18:00
Excel For Freelancers
Рет қаралды 7 М.
Say Goodbye to IF Statements in Excel with SWITCH
7:45
Teacher's Tech
Рет қаралды 597 М.
Loop Through All Files in a Folder Using VBA/Macros in Excel
13:41
VBA For Beginners: Data Validation Taken To The Next Level
26:24
Excel For Freelancers
Рет қаралды 6 М.
Learn The 5 Best Practices You Should Be Doing In Excel VBA
25:56
Excel For Freelancers
Рет қаралды 7 М.
5 Excel Secrets You'll Be Embarrassed You Didn't Know
17:32
Excel Campus - Jon
Рет қаралды 274 М.
Learn Excel VBA to Automate Anything
14:02
Kenji Explains
Рет қаралды 524 М.
The Secret To Creating Excel Tables With VBA + Free Cheat Sheet
16:24
Excel For Freelancers
Рет қаралды 10 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН