Hi i am trying to port a vb application from 98 to xp i am getting the errors in the code mentioned below.

Can anyone tell me what this code does?

Sub KillFiles(ByVal FileSpec)
Dim count As Integer
Dim files() As String
Dim i As Integer
Dim ThisFile As New QPFile <-- Gettting error
Dim found As QPFoundFile

count = FCount(FileSpec)

If count > 0 Then
'ReDim files(count + 1)
ReDim files(0 To count)
files(0) = FileSpec

' ReadFile files(0)
Set found = ThisFile.Dir(files(0), True)

For i = 1 To count
KillFile files(i)
Next i
End If

End Sub


Basically, you are trying to create a new qpfile object (er a variable of the qpfile type). The bad news, is that qpfile was installed on the 98 box, but doesn't appear to be installed on the XP box. The other viable problem, is that if the qpfile program was installed on the XP box, perhaps the ocx's or dll's needed for the creation of the qpfile type are not registered. Perhaps you can find those on the 98 box, and copy them to the XP box as well?