I'm a beginning VB6.0 learner and I'm trying to write a small VB program which copies/backsup VB files I'm working on into a directory/folder on a FAT16 drive (WIN98 is FAT32 and NT is NTFS). This will enable me to work with these files when I run NT ( NTFS ).
I understand (I think enough) objects in that everything in the VB world (as in the C++ world) is an object, which has properties and methods. All of the help documentation describes the methods associated with file manipulation(i.e. file I/O, writing to, reading from, appending, COPYING) as being part of an object known as: FileSystemObject.
Yet, when I try to create (instantiate) an instance of this object,
'Dim fso As FileSystemObject
Private Sub cmdStart_Click()
MsgBox "Copying files. . . ."
FileCopy "d:\Program Files\Microsoft Visual Studio\VB98\Works_In_Progress\*.*", "c:\VB_Shared_Backup\"
MsgBox "All done!"
It didn't like the fso object declaration, which is why it's
commented out. Using FileCopy as above seems to do something until I click "OK" and then I get error #52, "Bad file name or number".
This seems to me to be somewhat straightforward, but it's not.
If I try to define an object of type FileSystemObject as in:
Dim fileObject As FileSystemObject
I receive a "User-defined type not defined." error.
Which method associated with which object(s) is/are needed here?