+ Reply to Thread
Results 1 to 44 of 44

Can I use one user form for multiple outputs?

  1. #1
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Can I use one user form for multiple outputs?

    I have multiple machines that can have multiple tool sets. Each one must be tested at intervals.

    I am trying to build a user form to easily input this information to reduce confusion and improve user accuracy/ease of use.

    Problem is, I'm getting mixed signals from what I'm building.

    So, here are the questions:

    1) Can I have a command button open a user form to select the "tool" being tested?
    2) Can I then use just one user form and direct it to multiple outputs?

    I'm trying to do this, but I'm just not getting anywhere, and I'm confused, frustrated, and overwhelmed.

    Please help me with a starting point. I can build from there.

    Thanks,
    TR

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Can I use one user form for multiple outputs?

    Can you give some more information and/or examples of inputs/outputs etc?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Machine 1 has tool a,b,etc

    The info needed for each test is: Lot, Shift, Date, Pocket, test result.

    So, I have a spreadsheet with all of the machines listed, with each tool listed separately. The spreadsheet currently ends at column DP.

    I am currently using input boxes. A command button on the first page opens the input sheet and finds the machine and tool.

    The layout is like this:

    example of machines.xlsx

    Sorry to take so long to reply. I am not at my desk today.

  4. #4
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Has anyone had a chance to look at this? I can't seem to find anything quite like it in all of my searching.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Can I use one user form for multiple outputs?

    Could you upload an example workbook which includes the inputboxes etc?

  6. #6
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Oh, dear. I didn't realize that. Sorry, I thought it was Macro enabled.

    example of machines.xlsm

    I need to be able to select a machine, then the tool, then have the input be able to be put at the end of the column under that machine.

    If I can I alter the row source property, would that change the output?

    Just tried it and realized that I put the user form of frmTestInput up from the command button, not the form frmInputSelect.

    Sorry about that.....
    Last edited by TRLWNC; 12-17-2014 at 03:20 PM. Reason: error in file

  7. #7
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I am so far above my knowledge level here it isn't funny. I tried to get the input form to show the machine, then the tool, but it isn't changing the tool. After the second selection, I need to go to the input location and put in the values for the test. I'm not even sure what the first step is.

    example of machines.xlsm

    This is updated with the correction and form filled a bit.

  8. #8
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    Hi TR,
    I created a user form for End Of Shift Reports for my employer. It seems to me that what I have might work for you, with some modifications to the code. One major question though at this point.....Is the format of the Raw Data spreadsheet set in stone, or can it be changed?
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  9. #9
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    This will need to be changed, as the machines may change. Don't know if they will add or subtract, but the one constant is change.

    That would be great if you could get me a similar form! Thanks!

  10. #10
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    640

    Re: Can I use one user form for multiple outputs?

    Can you create an individual userform for each tool, then create a userform with tickboxes with the name of each of the tools.

    Then just enter the code (example has 3 tools)
    Please Login or Register  to view this content.
    The tool subs need to be entered into a module, create one for each tool that needs testing

    Please Login or Register  to view this content.
    Repeat as needed

  11. #11
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    That makes sense. I'll have to tryit out.

    Thanks!

  12. #12
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Okay, I got it to work.

    But that is a MASSIVE "If" statement when I do this for all of my machines. I may have over30 separate "If"s.

    Is there a loop that could look through the list?

    I'll go look, and check back in a while.

    example of machines.xlsm
    Last edited by TRLWNC; 12-18-2014 at 01:15 PM. Reason: Clarification

  13. #13
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Thank you so very much for all of the input so far!

    I think I'm going to have separate input boxes for each machine. That way, there will be fewer "If" statements in each one and each machine can have its own box.
    Last edited by TRLWNC; 12-19-2014 at 08:54 AM. Reason: Added thoughts for next step.

  14. #14
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    On Friday, I took another class in an Excel tutorial I'm taking from Ed2Go.com, and the instructor presented us with exactly what I wanted for this problem. I was able to make it work for this, and I now have the ultimate in flexibility and ease of programming:

    example of machines.xlsm

    Now I need to figure out a way to call a subroutine by saying something like this:

    Please Login or Register  to view this content.
    I searched, and found the following:

    http://www.excelforum.com/excel-prog...parameter.html

    Is that a way of doing this, or am I looking in the wrong direction?

  15. #15
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    TR,
    Howdy, I think I may be a little perplexed as to what you wanted. Is all, or just some of the information on the "Raw Data" sheet manually entered by the user? If not all of it is manually entered, which ones are not, and where does the information come from that does get entered?

  16. #16
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    The machine is selected, then the tool is selected. The two numbers that are generated are what I would like to use as variables.

    I'm sure that I can get those two numbers into two variables, I'm just not totally sure how.

    When I have the variables, I want to put them into the "Call" statement. However, I don't understand how to put the variable into a "call" statement. I'm looking, but it's not an easy question to ask, and I'm not finding it quick.....

  17. #17
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    When you say "the two numbers", do you mean the machine and tool numbers?

  18. #18
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Yes, sorry.

  19. #19
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    No problem, just trying to get myself clear. My thought was a user form that the user either inputs data into a field, such as the date, work order #, etc., and/or selects certain data, like the machine and tool #'s. The form would automatically open when they opened the workbook that this information is going to be saved in. Once they enter all the information, they click a button (submit?) and the information would be transferred to the required spreadsheet. Once they finish, they click another button (close and save?) and it would close the user form and save the workbook. Is this anything like what you were looking for?

  20. #20
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    This is an always-on worksheet, used many times an hour. I have a user form in the program (if you press the current "New Test" button, oops, I removed that part in anticipation of this working....), and I am happy with how it inputs the info for now. I am just trying to generate a way to get to it using the variables on the first page. That way, if I add or remove a machine or tooling, I can just change a number or two, add the necessary columns, and direct the inputs to the appropriate area.

    What you say works fine, it is just more than I need.
    Last edited by TRLWNC; 12-22-2014 at 01:02 PM. Reason: clarification

  21. #21
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    AHHH HAAA!, I wondered why there was no code for the New Test button!! lol. Can you possibly upload another example with the "New Test" button working, or just the code for the New Test button? That way I can see how it all is supposed to work.
    Last edited by gmr4evr1; 12-22-2014 at 01:24 PM. Reason: added how its supposed to work

  22. #22
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Quote Originally Posted by TRLWNC View Post
    Okay, I got it to work.



    Attachment 365693
    This version works like I want it to.

  23. #23
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    My bad, somehow I missed the post where you said you got it to work. Sorry, I wasn't able to help you out with this, but, I think you may have inadvertently helped me with an issue I was having a while back. So........Thanks!!

  24. #24
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Well, I'm sorry you won't be able to help, but I'm glad I was able to solve your problem!

  25. #25
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    How does this relate to this question?

    http://www.mrexcel.com/forum/excel-q...lications.html

  26. #26
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Oh, wow, has this been a headache. Trying to do something with a system that refuses modification really, really stinks.

    So, I ditched the ideas I had before and went with a different system. It works, amazingly enough, so I will begin the process of using this system to build my full scale spreadsheet.

    Here is my project as is. I'm sure there is a LOT to do to get it looking better. But, I need to build what I will use....

    example of machines Level 3.xlsm

  27. #27
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I am going crazy here. I have built my user form, and everything works great. But, it won't return to the first page by using the:

    Please Login or Register  to view this content.
    code.

    What am I doing wrong? It worked fine in the example! I am pulling my hair out here!

  28. #28
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I figured it out. A bit of gigo on my part. But, this coding thing is a headache! Welcome to puzzles upon puzzles.

  29. #29
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    Wow, I haven't heard/seen the gigo acronym in a lonnnnnnnng time! I wonder how many of this generation know what it means.....without having to look it up lol .

  30. #30
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I actually had a licensed programmer ask me what that meant recently.....

  31. #31
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    Wow.....guess now-a-days with GUI, there isn't much call for users to have the gigo problem, but, a programmer should have some idea, I would think.

  32. #32
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Quote Originally Posted by TRLWNC View Post
    On Friday, I took another class in an Excel tutorial I'm taking from Ed2Go.com, and the instructor presented us with exactly what I wanted for this problem. I was able to make it work for this, and I now have the ultimate in flexibility and ease of programming:

    Attachment 366385

    Please Login or Register  to view this content.
    I keep coming back to this because it just doesn't make any sense. I have put in the following code with an activeX command button on the "Input Finder" page:

    Please Login or Register  to view this content.
    But when I exit design mode, I get this error:

    Can't exit Design Mode because Control 'New Test' cannot be created.
    What is going on? I have the system working just fine on the other one, but this one is just weird. Does anyone have a clue why this error would come up?

    I want to know so that if this ever comes up on another workbook I can understand why it is happening and prevent further problems.

    Thanks.

  33. #33
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Nevermind. Fixed it. Thanks!
    Last edited by TRLWNC; 01-19-2015 at 12:43 PM. Reason: fixed-gigo again.....

  34. #34
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    This is a common issue since an update came out. I've looked into it, and it seems the most common, and simplest solution is this .....
    Quit Excel.
    Start Windows Explorer.
    Select the system drive (usually C.
    Use the Search box to search for *.exd
    Delete all found files.
    If I am not mistaken, when you go back into excel, it will recreate the .exd files and things should work normally.
    This reply is for post # 32 ONLY!!!!!!
    Last edited by gmr4evr1; 01-15-2015 at 10:17 AM. Reason: Update for post # 32

  35. #35
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Thanks, I'll double check that I got all of them. I thought I had tried this already.....

  36. #36
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    You may have, my post was in response to your post #32

  37. #37
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I went live with my spreadsheet this month, and found something that I needed to iron out. The text is small, and so incorrect items were being selected. I have found out how to fix this using ActiveX text boxes that I was able to alter the text size of.

    The problem was, I didn't know how to link the boxes or to initiate the code. So, I looked around and found that the boxes could be linked this way:

    I made the ListFillRange (or RowSource in a user form) for the first box the "Machines" list, and the second one linked by this code:

    Please Login or Register  to view this content.
    And the input process could be activated with this code:

    Please Login or Register  to view this content.
    This is a nice addition, as I am able to have larger type. Now I just need to code it all in.....

    Hope this helps someone!

  38. #38
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Quote Originally Posted by gmr4evr1 View Post
    No problem, just trying to get myself clear. My thought was a user form that the user either inputs data into a field, such as the date, work order #, etc., and/or selects certain data, like the machine and tool #'s. The form would automatically open when they opened the workbook that this information is going to be saved in. Once they enter all the information, they click a button (submit?) and the information would be transferred to the required spreadsheet. Once they finish, they click another button (close and save?) and it would close the user form and save the workbook. Is this anything like what you were looking for?
    In the end, this is exactly what I built. It's pretty involved, but it does a wonderful job. Another plus is that everyone who uses it thinks it's great! Yeah! Win-Win!

  39. #39
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    Lol. It was, yes was, a win-win for me as well, we use a form like that for our End of Shift Report (EOSR). The users loved it, but now management wants the EOSR emailed after each shift. Now the users want the email to be automatically generated. So I have been trying to figure out how to automatically email it for the users when they click save and close. The problem is, I cant get it to email the formatting without using copy/paste. Driving me nuts. Oh well, back to the coding board!

  40. #40
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    Try this video out. It works for me!

    https://www.youtube.com/watch?v=f8s-...3akx_gFMnpxTN5

  41. #41
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    Thanks, I'll check it out in my "down Time".

  42. #42
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I have gotten my system to a very complete operation. Since I have many on this forum to thank for helping me get to this point, I want to share what I have with you. See attached:
    example of machines Level 4.xlsm

  43. #43
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Asheville, NC
    MS-Off Ver
    Excel 2016
    Posts
    99

    Re: Can I use one user form for multiple outputs?

    I have an interesting question for this. I am taking a programming class, and we have gotten into arrays. I am intrigued with the idea of using an array and a loop to eliminate all of the repeated code for my test inputs.

    But how do I do that? Any suggestions?

  44. #44
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Can I use one user form for multiple outputs?

    You may want to post another thread for this question. I have no idea how to use arrays. At least not intentionally.

+ 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] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  2. [SOLVED] Excel vba user form- open directly to user form not worksheet
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 04-24-2013, 05:07 PM
  3. [SOLVED] Excel user form- If/Then statement outcome to show on user form
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2013, 09:16 AM
  4. User Form to Search multiple Criteria to return multiple Results
    By Calieth in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-16-2011, 11:57 AM
  5. User form to multiple worksheets
    By KLahvic in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-02-2009, 09:28 AM

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