title: In Visual Basic 6.0, how do I move to a specific line?
body: <p>In Notepad, under the <em>Edit</em> menu there is the Goto button to move to a specific line. I have tried to do coding for this in Visual Basic 6.0, but it does not work. The code is as shown below</p>
  
  <pre><code>Private sub goto_click()
      Dim s As String
      s = InputBox("Enter line number")
      If IsNumeric(s) = True Then
          RichTextBox1.SelStart = RichTextBox1.GetLineFromChar(s - 1)
          RichTextBox1.Move (s)
          RichTextBox1.SetFocus
      End If
  End Sub
  </code></pre>