Understanding VBA Code: Excel VBA Programming with File System Objects (Part 1 of 4)

preview_player
Показать описание
*********************************
*********************************

Understanding VBA Code: Excel VBA File System Object (Part 1)

Video description
----------------------------
The goal of my Excel VBA tutorials are to take you from a beginner level to a confident VBA developer and programmer as quickly as possible. The best way to do this is to help you UNDERSTAND how to code in VBA.

A very common VBA coding task is managing files and folders: copying files, deleting files, creating folders, checking if files exist etc. When programming in VBA (Access or Excel) there is an excellent tool available to help us with this: the File System Object.

The File System Object is part of the Microsoft Scripting Runtime. When setting up our spreadsheet we have to make sure we enable the Microsoft Scripting Runtime in the library references from the visual basic editor (VBE). Once we have done this we can use all of the objects in the Scripting Runtime library within our VBA code.

In this free beginner level VBA tutorial we use Microsoft Excel 2016. We start with a blank Excel Spreadsheet and you will learn:
1. How to enable the Microsoft Scripting Runtime library in the Visual Basic Editor;
2. The proper way to declare and initialise a File System Object using VBA code;
3. How to construct a full file path from a folder and filename using the BuildPath method of the file system object;
4. Some important points to watch out for when using File System Objects in your VBA code;

The video uses Excel 2016 but the same steps are used for Excel 2010, Excel 2013 and equivalent versions of Microsoft Access.

If you enjoyed this short tutorial then please add a comment, start a discussion, "Like", "Favourite" or "Share" the tutorial and subscribe to my channel.

Channel Links and Playlists
----------------------------

Other Useful Links
----------------------------
You can often find deals on my current and upcoming Udemy courses here

Thanks for watching!

Paul.
Рекомендации по теме
Комментарии
Автор

i thought BUILDPATH creates the actual path but i c it does not really create the actual folders, which is useless. for that i can use &. thankx for highlighting that fact.

tumzarelaxing