This code seems to be fine, but it may not work depending from where do you call it.
>hi all,
>
>i try to keep the Cursor at text1 if the file found,
>but it complate all the code.
>
>
>if adir(dummy,lcFile)>0
> MESSAGEBOX(" file exists")
> THISFORM.TEXT1.SetFocus()
> * RETURN
> else
> COPY TO (gcDelimName) XL5
> ENDIF
> endif
>.
>.
>.
>.
>.
>
>
>thanks for help.
If it's not broken, fix it until it is.
My Blog