title: Getting value from textbox and storing it in a variable in VBA
body: <p>I am trying to make an application to get the data from the textbox and store it in a variable for further uses thou I am getting value of it as 0 . Anyone can help out? </p>
  
  <pre><code>Dim value As Long
  
  value = Val(password.output.Caption)
  game.Caption = value
  </code></pre>
  
  <p>In the above code password is my form name and output is the name of field from where it shall get data and then later it is changing the value of game field to the value fetched of output and I am getting 0 as the value . What to do guys? Any help will be appreciated  </p>
  
  <h2><strong>UPDATE</strong></h2>
  
  <p>I would actually like to retrieve the string any idea how to do it?</p>