Can someone tell me what is wrong with this code. When I try to run it there is a run time error 5 "invalid call, function"...

VB Code:
  1. strB = "----------------------------------------"
  2.  
  3. txtAmajSpc.Text = intAmajSpc
  4.         lngPos = Val(intAmajSpc)
  5.         lngPos = lngPos
  6.         strFretNumb = "2"
  7.         strB = Left$(strB, lngPos - 1) & strFretNumb & Mid$(strB, lngPos + 1)

txtAmajSpc is a textbox on form where user inputs a number

Anyone know what's wrong?!