Re: vb6.exe closes randomly on W2000 Pro
From: mscir (mscir_at_usa.com)
Date: 08/12/04
- Next message: vbVeryBeginner: "Re: is it my fault or this is VB 6 bug!"
- Previous message: Karl E. Peterson: "Re: vb6.exe closes randomly on W2000 Pro"
- In reply to: J French: "Re: vb6.exe closes randomly on W2000 Pro"
- Next in thread: Randy Birch: "Re: vb6.exe closes randomly on W2000 Pro"
- Reply: Randy Birch: "Re: vb6.exe closes randomly on W2000 Pro"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 18:50:11 -0700
J French wrote:
> "Nina Harris" <sas@mailinator.com> wrote:
>>Ian wrote
>>>Can you please post the FileExists function code that you are using.
>>
>>Public Function FileExists(strDest As String) As Boolean
>> Dim intLen As Integer
>> If strDest <> vbNullString Then
>> On Error Resume Next
>> intLen = Len(Dir$(strDest))
>> On Error GoTo PROC_ERR
>> FileExists = (Not Err And intLen > 0)
>> Else
>> FileExists = False
>> End If
>>PROC_EXIT:
>> Exit Function
>>PROC_ERR:
>> MsgBox "Error: " & Err.Number & ". " & Err.Description, , _
>> "FileExists"
>> Resume PROC_EXIT
>>End Function
>
> That is pretty tangled code
> - /NEVER/ use Dir$() in a 'utilty function'
Can I ask what you mean by never using Dir$ in a 'utility function'? Are
you implying that Dir$ is somehow unreliable? I use Dir$ all the time
instead of FSO.
Mike
- Next message: vbVeryBeginner: "Re: is it my fault or this is VB 6 bug!"
- Previous message: Karl E. Peterson: "Re: vb6.exe closes randomly on W2000 Pro"
- In reply to: J French: "Re: vb6.exe closes randomly on W2000 Pro"
- Next in thread: Randy Birch: "Re: vb6.exe closes randomly on W2000 Pro"
- Reply: Randy Birch: "Re: vb6.exe closes randomly on W2000 Pro"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|