AlHal2
asked on
VB6 filesystem object in vb2005
Please can someone upgrade this code from VB6 to VB 2005 as the upgrade wizard fails?
Dim Mload As Folder, RepFile As File, NewFile As String, MloadDirectory As Files
Dim FSO As FileSystemObject
Private Sub form_Load()
Set FSO = New FileSystemObject
Set Mload = FSO.GetFolder("C:\temp")
Set MloadDirectory = Mload.Files
For Each RepFile In MloadDirectory
RepFile.Delete
Next
Dim Mload As Folder, RepFile As File, NewFile As String, MloadDirectory As Files
Dim FSO As FileSystemObject
Private Sub form_Load()
Set FSO = New FileSystemObject
Set Mload = FSO.GetFolder("C:\temp")
Set MloadDirectory = Mload.Files
For Each RepFile In MloadDirectory
RepFile.Delete
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's great. Thanks.
Switch to the "COM" Tab.
Select the "Microsoft Scripting Runtime" Entry and Click "OK".
Your converted code:
Open in new window