View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default If the file exists "Yes should appear"

Function FileExists(UserName as string) as string
Const DIRPATH as string="C:\stuff\" 'or whatever

if dir(DIRPATH & UserName & ".xls")<"" then
FileExists="Yes"
else
FileExists="No"
end if

end function



Tim

"Sami82" wrote in
message ...

Hi All,

I am asking people to fill out a questionairre, which their responses
are saved in a shared folder. Their responses are saved as
theirname.xls. Is it possible, if I have an excel sheet with all the
names in one column, to have excel put a "YES" in the adjacent column
if the userse file exists?

Thank you for your quick reply.


--
Sami82
------------------------------------------------------------------------
Sami82's Profile:
http://www.excelforum.com/member.php...o&userid=27111
View this thread: http://www.excelforum.com/showthread...hreadid=525538