+ Reply to Thread
Results 1 to 11 of 11

programming option button_ if errors

  1. #1
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Unhappy programming option button_ if errors

    Hi, i have been looking for help and i have just don`t figured out.

    I am tryin to program a userform, just for collecting inlet data in diferent cell in diferent worksheets of the same workbook. And i want to put those data dependind if the optionbutton is true or not.

    I want to capture data in written in textbox8 in cell b27 of worksheet 4 if my option button is marked, and if not i want to capture the data of the textbox8 in the cell d27, both are currency type.

    This is wath im trying to use:



    Please Login or Register  to view this content.
    Last edited by napo537; 06-05-2010 at 02:49 PM. Reason: the text was not clear

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: programming option button_ if errors

    Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to EDIT that post above and put code tags around that code you used. (Like shown in my signature)

    Fix that and I'll look over your macro.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Unhappy Re: programming option button_ if errors

    I have done some changes and it does not work. Ive changed to if then endif, linear form. i `ve changed to if then else end if, i `ve tryied with if then elseif end if, and i have not a clue, whats going on.

    i was wondering if one problem could be that im programing on the textbox and not in the option button. im just blocked, sorry.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: programming option button_ if errors

    The Forum Rules.


    [code] <--- that is a code tag.
    Last edited by JBeaucaire; 06-04-2010 at 04:26 PM.

  5. #5
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: programming option button_ if errors

    i edit my tex, but i dont know exactly what do i need to do

    1.- i put EDIT
    2.- Select advanced
    3.- select de code and click on wrap with tags

    that was what you mean?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: programming option button_ if errors

    The Forum Rules.


    [code] <--- that is a code tag.

  7. #7
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: programming option button_ if errors

    SO, thats it or what else?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: programming option button_ if errors

    With no worksheet to test it on, I imagine the corrected code would look this perhaps:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: programming option button_ if errors

    Hello, it worked, now i don't have any message from an error. And it writes the value that i put in textbox8, but only in cell D27 besides that it doesn`t respect the conditional, is the same if a click on option button1 or optionbutton2, it puts in the data only in cell D27

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-03-2010
    Location
    Sinaloa, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: programming option button_ if errors

    hi, i did it, jeje, now, if i choose option button 1, y puts the data in cell b 27, and if i check optionbutton2 it writes cell D27. thasnk you very much

    check this out

    Please Login or Register  to view this content.

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: programming option button_ if errors

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1