+ Reply to Thread
Results 1 to 11 of 11

UserForm option buttons are displaying "False" instead of the correct answer

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    20

    UserForm option buttons are displaying "False" instead of the correct answer

    I am creating a Documentation tracker using a UserForm that I am teaching myself how to create.

    I have added option buttons on my userform and the answers are going to the correct spot on the data sheet but It is displaying FALSE instead of the Answer I tried to program.

    Below are the two areas that have to do with the option buttons.

    Please Login or Register  to view this content.
    Last edited by bradfordahill; 04-14-2018 at 06:37 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,142

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Remove these lines
    Please Login or Register  to view this content.
    and replace with
    Please Login or Register  to view this content.
    Also move this line
    Please Login or Register  to view this content.
    To the very top of the module, before any code

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    20

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Quote Originally Posted by Fluff13 View Post
    Remove these lines
    Please Login or Register  to view this content.
    and replace with
    Please Login or Register  to view this content.
    Also move this line
    Please Login or Register  to view this content.
    To the very top of the module, before any code
    Thank You for responding. I applied your corrections and now the tracker is not displaying anything where before it was stating "FALSE". I am sure I am doing something incorrect. Below is how the entire code looks and keep in mind this is my first time creating a UserForm and everything I have done and know is from internet research.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,142

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    It needs to be like
    Please Login or Register  to view this content.
    Where the line in red needs to be the first line in the module

  5. #5
    Registered User
    Join Date
    07-17-2014
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    20

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Attaching a copy of the UserForm.

    Unfortunately I am still unable to get your suggestions to work and I am sure I am just not understanding.



    +*+*Attachment Removed+*+*
    Last edited by bradfordahill; 04-16-2018 at 12:20 PM. Reason: Removing attachment

  6. #6
    Valued Forum Contributor
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,142

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Thanks for the workbook.
    Try replacing all your userform code with this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-17-2014
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    20

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Thank You - You are the bomb.com

    Now I just need to get a VBA for dummies book.

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    5,822

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    You have made some classic mistakes.

    I am attaching some sample Userforms for your perusal.

    Meanwhile try this code:-
    Please Login or Register  to view this content.


    These are my basic rules for Userform Design.

    Rule 1. Never Rename your controls, It makes Coding Harder


    Please Login or Register  to view this content.
    The above code enters the numbers 1 to 100 in textboxes 1 to 100
    How would you do that if each Textbox has a unique name?


    Rule 2. Number Each Control with the Column Number of its Source Data.

    Please Login or Register  to view this content.
    The above code loads Textboxes 1 to 100 with the data in row 1, columns 1 to 100



    Please Login or Register  to view this content.
    The above code Stores Textboxes 1 to 100 in row 1, columns 1 to 100


    Rule 3. You can have more than one control storing data to the same cell
    or
    reading data from the same cell

    That is not a problem. As long as they are not the same type of control.

    Eg. Textbox1, Combobox1, Label1 can all read / write to the same cell

    Rule 4. You can use your Titles as the default text of a cell to avoid having labels
    This makes your userforms cleaner.


    Rule 5.
    Do not make Multiple Read / Write actions between Excel and VBA.

    Read / Write your data into an Array. Then Save that to excel, Or transfer the data to your Controls.
    Attached Files Attached Files
    Last edited by mehmetcik; 04-16-2018 at 12:28 PM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  9. #9
    Registered User
    Join Date
    07-17-2014
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    20

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Thank You - This seems to be much more advanced that I am currently as I do not know what most of what you typed means. However, I appreciate your response and samples and will most definitely look and review them to increase my knowledge base and apply to my current project.

  10. #10
    Valued Forum Contributor
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,142

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    Quote Originally Posted by bradfordahill View Post
    Thank You - You are the bomb.com
    Glad to help & thanks for the feedback

  11. #11
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    5,822

    Re: UserForm option buttons are displaying "False" instead of the correct answer

    I have added Userform 23 to my samples to demonstrate the use of Arrays to read and write between Excel and VBA.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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