+ 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
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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
    8,448

    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.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  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
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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
    8,448

    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)

Similar Threads

  1. [SOLVED] UserForm with "Cancel" and "Proceed" buttons
    By kappa0815 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2017, 07:31 AM
  2. Userform option buttons set to false
    By c.davidson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2016, 04:39 AM
  3. [SOLVED] populate "skip" labels in userform with the correct answer
    By intex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2014, 02:36 PM
  4. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  5. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  6. Replies: 7
    Last Post: 05-13-2006, 05:02 PM

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