Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Form option button not working (https://www.askmehelpdesk.com/showthread.php?t=577217)

  • May 19, 2011, 02:45 PM
    dannac
    Form option button not working
    Code:
    ' Transfers Amount
    If OptionButton1 Then Cells(Nextrow, 4) = TextBox4.Value
    If OptionButton2 Then Cells(Nextrow, 5) = TextBox4.Value


    Problem is with OptionButton2

    OptionButton2 is inputting TextBox value to col 4 and col 5.

    As if OptionButton1 does not get turned off when I select OptionButton2.

    Both option buttons are within a frame on a form.

    OptionButton1 works correctly.
  • May 19, 2011, 03:31 PM
    JBeaucaire

    Can you post a file with this form and instructions on testing/seeing the error duplicated?
  • May 20, 2011, 11:07 AM
    dannac

    This is fixed... Thanks

    This works
    Code:

    '  Transfers Amount
        If OptionButton1 Then
        Cells(Nextrow, 4) = TextBox4.Value
        Cells(Nextrow, 5) = ""
        End If
       
        If OptionButton2 Then
        Cells(Nextrow, 5) = TextBox4.Value
        Cells(Nextrow, 4) = ""
        End If


  • All times are GMT -7. The time now is 05:01 AM.