Re: Check or a file exist give wrong result

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Gerrit van Stempvoort (gerrit.vans_at_hccnet.nl)
Date: 05/03/04


Date: Mon, 3 May 2004 21:09:35 +0200

Hi Tom,

I used the solution send in by tinyjack before you send in your solution.
When I psot my reply I did not notice that you had send another solution to.
>From you I understand that MatchTextExactly = True has nothing to do with
filename, but still it is strange to me that if I ask for Filename =
"up12_7.txt" the filename "up12_70.txt" is also included. I'm afraid that
I'm not the only one that thinks like that and get an error because of this.

Anyway thanks for your solution and support. I see your name very often and
learned also a lot from your answers on question from other users.

Best regards,
Gerrit

"Tom Ogilvy" <twogilvy@msn.com> wrote in message
news:uRsfV3QMEHA.3052@TK2MSFTNGP12.phx.gbl...
> Even after I explained it to you? What part don't you understand?
>
> --
> Regards,
> Tom Ogilvy
>
> "Gerritvans >" <<Gerritvans.15oj4h@excelforum-nospam.com> wrote in message
> news:Gerritvans.15oj4h@excelforum-nospam.com...
> > tinyjack wrote:
> > > [B]I would not use the FileSearch object to do this, you can just use
> > > the Dir function:
> > >
> > > >
> > Code:
> > --------------------
> > >
> > > Sub test()
> > >
> > > Dim strFound As String
> > >
> > > strFound = Dir(Interaction.Environ$("userprofile") & "\My
> Documents\Test files\up12_7.txt")
> > >
> > > If Len(strFound) > 0 Then
> > > MsgBox "File found"
> > > Else
> > > MsgBox "File NOT found."
> > > End If
> > >
> > > End Sub
> > >
> > --------------------
> > >
> > >
> > > HTH
> > >
> > > TJ [/B]
> >
> > Thanks TJ, your solution is working fine. But I still not understand
> > what was wrong with my solution...
> >
> > Gerrit
> >
> >
> > ---
> > Message posted from http://www.ExcelForum.com/
> >
>
>



Relevant Pages

  • Re: Get default filename from bookmark content
    ... I only want the filename to be set as the ... >> regards arne ... >>> Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org ...
    (microsoft.public.word.vba.general)
  • Re: Getting Excel file properties Using Outlook
    ... Viele Gruesse / Best regards ... Michael Bauer - MVP Outlook ... This would mean I could add the correct filename into the ...
    (microsoft.public.outlook.program_vba)
  • Re: CameraCaptureDialog + OMNIA
    ... Best regards, ... We are using Samsung Omnia i900... ... it works fine but it didn't return the filename for me. ... If you know how to work with Omnia's camera in C# or where can I find working camera API please help me. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: split a file
    ... "Feisal Gaffar" wrote in message ... > Hi Folks, ... > # This is the beginning of filename ... > Best Regards ...
    (comp.unix.shell)
  • Re: excel file deleted. Now howdo you delete file NAME
    ... when you click on 'File' that you see the filename in your MRU (Most ... Regards ... It's easier to beg forgiveness than ask permission :-) ...
    (microsoft.public.excel.newusers)