title: why vbscript Mid function shows error 'Invalid Procedure Call or argument : Mid'
body: <p>Hi Below is my code of ASPClassic, in which csvData is a very large string containing variable.Now in this At line where Mid function is call error 'Invalid Procedure Call or argument : Mid' occur why this happens...</p>
  
  <pre>
  Dim dataLen 
      Dim fromLen 
         Dim toLen 
         Dim slab 
         Dim totalPass 
  
         dataLen =len(csvData)
         fromLen =0
         toLen =100000
         slab =100000
         totalPass =(dataLen/slab)
      if (dataLen Mod slab)>0  then
          totalPass=totalPass+1
      end if
      Dim i
      For i = 0 To dataLen
          i=toLen
          if toLen > dataLen then
              toLen=dataLen
          end if 
         <b>Response.Write Mid(csvData,fromLen,toLen)</b>
          fromLen=toLen
          toLen=toLen+slab
      Next
  </pre>