Button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jamie Taxer
    New Member
    • Oct 2011
    • 6

    Button

    Hi,

    I am very new to programming and am having a little problem. I am using visual basic to make a program for a psychology experiment. On one form I have two buttons and the participant is asked to select the option they prefer. I would like the option that they select to written in a text file and can't figure out how to do this. I know how to do this with a radio button but not a button. Thanks for any help!
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    In the button click event implement code that writes the user's choice to the file.

    You know what the user chose based on the button.
    It's essentially the same thing as a radio button except that instead of retrieving the selection from the radio button you know the user's selection already...becau se you are in the code that handles the click event for their choice.

    -Frinny

    Comment

    • Jamie Taxer
      New Member
      • Oct 2011
      • 6

      #3
      Thanks! I had done this and it hadn't worked, but now I realized that I had just forgotten to close the writing.

      Comment

      Working...