Re: locate a file using vba - I am stack
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 18:40:31 +0000
Does the user just want to look at the names, or do you want them to be
able to do something useful, such as select a file for some further
operation? If so, why not use the standard Windows File dialog (see
www.mvps.org/access/api/api0001.htm).
If you just want to look at the names, do they need to be sorted in
alphabetical order (or some other order), or is it OK for them to come
any old how?
On Thu, 26 Jan 2006 07:25:01 -0800, Rob <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
>Hi Ofer
>
>Sorry, I need to revise my question:
>
>How do I list (or display on the screen) all the .mdb/xls/csv/txt files
>under my
>C:\0Templates folder when the user click the button? It's like the windows
> explorer but I want it to just list what's on the C:\0Templates folder and
>only those extensions. If this is harder, then .mdb is just fine.
>
>Thanks again
>
>Rob
>
>"Rob" wrote:
>
>> Hi Ofer
>>
>> I have the same question but Im glad that I found your response. However, I
>> have a follow question to George's question:
>>
>> In your code:
>> Dim strPath As String
>> strPath = "c:\FileName.doc"
>> If Dir(strPath) = "" Then
>> MsgBox "Can't find file"
>> Else
>> ....
>> End If
>>
>> How do I list (or display on the screen) all the files under my
>> C:\0Templates folder when the user click the button? It's like the windows
>> explorer but I want it to just list what's on the C:\0Templates folder.
>>
>> Thanks in advance
>> Rob
>>
>> "Ofer" wrote:
>>
>> > Try
>> >
>> > Dim strPath As String
>> > strPath = "c:\FileName.doc"
>> > If Dir(strPath) = "" Then
>> > MsgBox "Can't find file"
>> > Else
>> > ....
>> > End If
>> >
>> > --
>> > \\// Live Long and Prosper \\//
>> > BS"D
>> >
>> >
>> > "George" wrote:
>> >
>> > > Hello everyone and Happy New Year.
>> > >
>> > > I want to write some code in MS-Access in order to see if a file is located
>> > > in a specific folder in Hard Disk. If is present then the user will be able
>> > > to enter the program.
>> > >
>> > > Thank you in advance,
>> > >
>> > > George (george_cyprus@xxxxxxxxxxx)
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.
- Follow-Ups:
- Re: locate a file using vba - I am stack
- From: Rob
- Re: locate a file using vba - I am stack
- From: Rob
- Re: locate a file using vba - I am stack
- From: Rob
- Re: locate a file using vba - I am stack
- Prev by Date: RE: Excel Automation?
- Next by Date: Re: Code running behind table? Strange occurance....
- Previous by thread: RE: locate a file using vba - I am stack
- Next by thread: Re: locate a file using vba - I am stack
- Index(es):