&nbsp;<BR><BR>Hi,<BR><BR>I am trying to use an asp text search script I came across on this site. I keep getting this error, but as far as I can see all the variables are declared. Below are the first few lines of the code that I think relate to the message.<BR><BR>This is the error message.<BR><BR>Microsoft VBScript compilation error &#039 800a0400&#039 <BR><BR>Expected statement <BR><BR>/ASPscripts/search.asp, line 1 <BR><BR>Option Explicit<BR>^<BR><BR>This is what the code looks like.<BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;% Option Explicit %&#062;<BR>&#060;%<BR>Function FormatURL(strPath)<BR><BR> &#039Cut off everything before wwwroot and replace all with /<BR><BR> Dim iPos<BR><BR> iPos = InStr(1,strPath,"wwwroot",1)<BR><BR> <BR><BR> Dim str<BR><BR> str = Mid(strPath,iPos+7,Len(strPath))<BR><BR> <BR><BR> FormatURL = Replace(str,"\","/")<BR><BR> End Function<BR><BR>Any help would be appreciated.<BR><BR>Thank you<BR><BR>Madeleine.<BR> <BR> <BR><BR><BR>