title: cancel or hide input box in vba
body: <p>I have a code which asks for an input between 1-3 using an <code>InputBox</code> which then runs a code depending on what input it is given. The problem i have is that i don't need that <code>InputBox</code> anymore, as the work i intend to do only uses one input which is 3.I tried removing the input box and just inserting 3 there but then the code doesnt do anything. I then tried to insert a default value in the box, but it still appears and needs me to click enter which is what i am trying to avoid. Pls how should i go about this problem.</p>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>Function GetTypeFile() As Integer
  
      Dim strInput As String, strMsg As String
      Dim Default
  
      choice = 0
      While (choice &lt; 1 Or choice &gt; 3)
          Default = "3"
  
          strMsg = "Type in the kind of entities to create (1 for points, 2 for points and splines, 3 for points, splines and loft):"
          strInput = InputBox(Prompt:=strMsg, _
                      Title:="User Info", Default:=3, XPos:=2000, YPos:=2000)
  
          'Validation of the choice
          choice = CInt(strInput)
          If (choice &lt; 1 Or choice &gt; 3) Then
              MsgBox "Invalid value: must be 1, 2 or 3"
          End If
      Wend
      GetTypeFile = choice
  
  End Function
  </code></pre>