+ Reply to Thread
Results 1 to 15 of 15

Make calculated cell visible on User Form

  1. #1
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Make calculated cell visible on User Form

    Attached is a portion of my file. At the top of the Pricing Sheet is a button called Add New Tire. When this is open I have highlighted the "textboxes" in yellow and the place where the calculated field goes in light blue. Open Add New Tire and in the yellow cells put any numbers (not big ones) but maybe something like 5, 5, & 5 These numbers per the calculation will equal 22. The problem I have here is that the calculated cell does not appear until I click on the Post Button and then the numbers you entered + the calculated cell will be posted to the Pricing Sheet. The calculated cell appears after you click on the Post Button, but I need to have that calculate cell visible before I post. If I see the results is way off, then maybe I have entered a wrong amount in one of the other 3 cells, so the purpose of this is so that if there is a wrong amount entered then it can be corrected before posting or it will have to be done manually corrected by going to the EOF to (My database has 4500+ rows). Go the VBA and the name of the form is AddTires and look at the code and let me know if you can fix it.

    As usual, thanks for the great help i get my you'all and hope the moderator doesn't reject this one.

    Jerry
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    Hi Jerry, if it a user form you add an change event to each of the 'yellow' cells at every change you do the calculation updating the light blue one.
    I suggest you als restrict the entry to only numbers and when calculation use Val(TextBox?) + Val(TextBox2) etc.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Re: Make calculated cell visible on User Form

    I don't know if you can do this, but if you can open the file in your version of Excel and enter your formula will it work, and if so give me that formula. I don't understand what you mean by restricting the entry to only numbers. I can't use numbers because they haven't been determined yet, because they will change. The formula I have is Weight.Value = 2.47 * Val(SH) * Val(SW) * (Val(SH) + Val(RD)) * 0.036 is the correct answer that goes in the blue cell and I want that to appear in that blue cell before I press the post button. The SH, SW, and RD are the 5, 5, 5 I gave as an example

    Btw, my wife's family is from the Netherlands and the last name is Hols

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    The 'Dutch' invade all places
    What I meant to say you can only permit numbers in the cells where you expect numbers.
    I'll download the file and try to implement it.
    Do you speak some Dutch? You know it's a terrible language, a Mexican friend of mine once tolde me "Dutch isn't a language, it's a disease of the throat"

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    Can you please tell which of the fields are whole numbers only and which have decimals?
    I can guess but need confirmation please

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    Sorry, could have looked at the table

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    This is what I did.
    Also, don't create a module for EVERY macro.
    I grouped then all in one module except one which should be part of the AddTire form

    BTW nice database that way (with the hidden sheets and info)
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Re: Make calculated cell visible on User Form

    WOW! Impressed with this, but you have disabled by POST BUTTON and can't add the tire to the database, and the ALT-SIZE textbox can't enter anything there so could you check that. Glad you didn't write the code in Dutch. My wife was from the group that invaded Pella, Iowa and she has an uncle that is buried in the Henri-Chapella Cemetery in Belgium (1945). Thanks for your help. Hope to hear from you soon.

    Also, and hate to ask this, but I really am not good at writing sub's. I have found out that all the subs for a particular workbook, etc can be on one page, but if I could get you to delete those on the one you sent me that doesn't apply to this user form, because i will need to copy the code and past to the orginal excel sheet. Thanks.
    Last edited by jevicha2; 06-29-2020 at 09:46 AM.

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    The POST BUTTON will become enabled once ALL the text fields have been completed and the ALT-SIZE you said NO CHARACTERS, well, NO CHARACTERS only numbers
    And VBA is happily only English

  10. #10
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Re: Make calculated cell visible on User Form

    Me again. On the sheet I sent to you I hide about 4 or so sheets. When I open the one I sent to you I can unhide those sheets, but not on the one you returned back to me. In 2019 it says to right click on an active sheet and select unhide, but unhide is greyed out. What I sent you was a my entire program (under a different name, and had deleted about 4500 rows). I copied the deleted rows over to the one I sent you, but the sheets are missing. Is there any way for me to copy or export your code to my copy orginal copy or find your marco? Everything works ok except when all the form is filled in I have to click on another text box to activate the Post Button It doesn't automatically activate.
    Button. Thanks, Jerry

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    I corrected the Useform and reattched the file.
    If you want to pass the modified userform to your own file, very simple.
    Open both files.
    Open the VBA Editor.
    Select YOUR file and right click on the userform AddTire and choose remove, you may save it (if you want) or just delete it.
    The you go to my file and select the AddTire userform and just left click and drag it to your file
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Re: Make calculated cell visible on User Form

    Thanks, I added the decimal to the RD value (maybe I forgot to tell you) and commented out the USAGE value because it's not required.

    Hartelijk dank, hoop dat ik je op mijn volgende probleem (That' supposed to be: Thank you very much, hope I get you on my next problem)

  13. #13
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    Graag gedaan 😊
    Well, I’ll be here
    Happy coding 👍

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Make calculated cell visible on User Form

    BTW, I forgot to mention it but the worksheets that you have hidden are to speak in Exel terms 'Very Hidden' that means you cannot unhide them using the right click on th tab , you need VBA code to do that or manually from within the VNA project.

  15. #15
    Forum Contributor
    Join Date
    10-17-2018
    Location
    Knoxville, TN
    MS-Off Ver
    Office 365
    Posts
    214

    Re: Make calculated cell visible on User Form

    Never mind on that I just copied your form over to the one I have, so would you be interested in seeing the finals results. I have the form pop upon a sheet where you see how to get the values in the form. I think its neat when a pro-less, non-expert, non Excel guru can do with the help of those who are pro's, experts, and Guru's. I can send you a picture.. Does your private e-mail allow that or a copy of all of it.

+ 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. Replies: 0
    Last Post: 07-28-2016, 08:43 AM
  2. Trigger message box after user updates VBA form based on data calculated in a cell
    By blackelvis73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2016, 12:51 PM
  3. Make macro button visible/invisible as per user name
    By nayanthara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2014, 03:46 AM
  4. Make the main form visible and rest should be hidden
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2013, 08:34 AM
  5. User Form components' VISIBLE property issue
    By DaveS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2011, 04:53 PM
  6. Text field visible property on user form
    By JChandler22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2010, 02:44 PM
  7. Make selected row visible to user when out of screen view
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2005, 08:05 AM

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