![]() ![]() ![]() Target = Path & "\New BackupDB" & ".accdb" ‘assign new location with new file name to Target Source = CurrentDb.Name ‘current database file with its path More information about FileSystemObject here.įor example, there are some things below that you can do by using the FileSystemObject in Access VBA:Įxample of Using FolderExists, CreateFolder, and CopyFile method of FSO Public Function CreateBackup() As Boolean Before using the FileSystemObject, we need to create the Object by using code: Set objFSO = CreateObject(“Scripting.FileSystemObject”). The FileSystemObject has many usable methods such as CopyFile, DeleteFile, CopyFolder etc. It is a powerful and short code which is handy to use. It can create new files, folders, directory paths, and access the existing ones. It is a built-in command in the system that VBA can use. The FileSystemObject is used to gain an access to a computer system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |