What am I doing wrong?

Results 1 to 3 of 3

Thread: What am I doing wrong?

  1. #1
    OleJ Guest

    Default What am I doing wrong?

    Her is my code:<BR>&#060;%<BR>Dim objFSO<BR>Dim TPCounter<BR>Dim Path<BR>TPCounter = 1<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>&#039;Path = "p:mrr_web p p"&TPCounter&"MMI simulator"<BR>Path = "p:mrr_web p p"&TPCounter&"Test"<BR>If Not objFSO.FolderExists(Path) then<BR> Response.Write("Folderen finst ikke"&TPCounter&"<BR>")<BR> Response.Write(Path)<BR> objFSO.CreateFolder(Path)<BR>End If<BR>%&#062;<BR>Why do i get this error message?<BR>Microsoft VBScript runtime error &#039;800a004c&#039; <BR><BR>Path not found <BR><BR>/mrr_web/index.asp, line 14 <BR>

  2. #2
    Join Date
    Dec 1969

    Default try using EVAL()

    Path = EVAL("p:mrr_web p p" & TPCounter & "Test")<BR>

  3. #3
    Join Date
    Dec 1969

    Default What???

    eval is not used to concentanate strings together rather to eun code that is in the form of a string eg<BR><BR>dim i, j<BR><BR>j = 2<BR><BR>eval("i=" & j)<BR><BR>i now also =2<BR><BR>however if TPCounter = 100<BR>Then<BR>eval("p:mrr_web p p" & TPCounter & "Test")<BR><BR>will produce the code p:mrr_web p p100Test<BR>not really vb syntax now is it?? let me guess runtime error either type mismatch or end of line character expected etc.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts