Hi all
i was wondering how i can incorperate this code into my workbook
ThanksPlease Login or Register to view this content.
Keith
Hi all
i was wondering how i can incorperate this code into my workbook
ThanksPlease Login or Register to view this content.
Keith
doubleclic on userform, then paste the code
If solved remember to mark Thread as solved
Thanks for your response, but i have tried that and the comboboxes do not populate
Please Help
Keith
You don't have a sheet named Sheet1, explain better your goal.
Hi, patel45,
I would recommend you have a look at the workbook which has been attached before pasting in your thoughts of what might be your solution without testing what you are answering on the file where you would have noticed the different names for the comboboxes.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
thanks for responding
ok here it is, the original post attachment new1.xls does not populate the names when the form is activated, so i made a sample
workbook called userform.xls, and some nice person answered with the code below.
so i copied it into the workbook called userform.xls, and it works perfect, i can change the name to any name right beforePlease Login or Register to view this content.
i activate the form, and it works perfect.
So i copied and pasted it into the workbook called new1.xls and tried to change some things like the name of the comboboxes,
sheet names, the 1 to 6, to 3 to 8, and had no luck making it work, i'm just new to excel and asking for help, i'll attach both
workbooks so you can see how good the code above works in userform.xls workbook. i hope i explained myself a little bit better
this time.
Thanks
Keith
Hi, Quicksnot,
as long as you only use CombBoxes that are named cmb1 to cmb6 there is no problem with the code that you have but if you alter the names of the boxes to read cmb1 to 3 as well p_cmb1 to p_cmb3 you would need to adjust the code to find the proper controls (not loop from 1 to 6 but from 1 to 3 and adjust the names as well).
You may delete the RowSources for the ComboBoxes as well as these should be set by code (if you want to work with the UserForm for multiple sheets). What I didnīt pick up until now is how win and loss will be distributed, you may have to adjust the code there.
Code goes behind the UserForm (Iīve taken the workbook from the opening post as reference):
Ciao,Please Login or Register to view this content.
Holger
Thanks HaHoBe
but unfortunately everything I tried was unsuccessful changing combo boxes, I guess I need to start with getting the names in 1st which
was successful, then get the rest of the code to do what it already does.
Thanks
Keith
Hi, Keith ,
your anser leaves me guessing if you have succeeded in finding a way to solve your problem or not.
The code you put it canīt run (I mentioned the reason to be the different CB-names) if put behind the userform while the Activate-event I published should get the ComboBoxes to show the names from each sheet where the UserForm will get started.
I would prefer not to fill the ComboBox on initializing or activating the UserForm but when the CombBox gets the focus and holding all names which are currently not being used in other comboboxes (which would leed to use AddItem and a loop).
Regarding the code to put the results in: in my code there is an error as only the column to write into for the first CB is taken and used as well for teh second one (no matter how may entires there may be after taht coilumn).
Ciao,
Holger
Thanks HaHoBe, I'm sorry but I'm not very good with code at all, people here are awesome at it, I keep trying to change things to get it to work, but
can't get the comboboxes to populate at all, the program works great except for that tiny piece of the puzzle.
Thanks
Keith
Hi, Keith,
I assigned a shortcut for bringing up the UF on every sheet except for Stand: CTRL+SHIFT+D.
Altered code in Module9:
I only inserted the part for populating the comboboxes behind the UserForm.Please Login or Register to view this content.
Please check the attachment and see if it works for you.
Ciao,
Holger
Thanks for responding HaHoBe
I saved the EF989590.xls to desktop, it opens on team3, used ctrl shift D, and the userform1 pops up, but nothing populates the userform
am I doing something wrong?
Thanks
Keith
I have a question about the forms, is it possible to use the userform that just picks up the names, with this code
and add a command button that will activate form 2 and hide form 1, but copy whats in the comboboxes to form2 and then let thePlease Login or Register to view this content.
code work its magic, just s thought.
Thanks
Keith
Hi, Keith,
just for me to understand:
What do you expect the code to do? Are the 6 ComboBoxes filled with the names from A3 to A19? Do you receive a run-time error? What else do you expect the UserForm to show?and the userform1 pops up, but nothing populates the userform
Regarding your second post:
No, the same has been asked by you in the opening post. There are still only cmb1 to cmb3 on the form I use, any value greater than 3 will cause a run-time error.
Ciao,
Holger
ok earlier post has 2 excel books, the userform.xls is what I would like to happen in the new1.xls
the "new1.xls" userform1 works perfect, don't want anything to change, except to incorporate the way
"userform.xls" populates the comboboxes, is that possible?, if not, I will try to figure another way with
maybe textboxes or something, the reason for the comboboxes, is so that the players may play the same 6
players or maybe subctitute someone that week player 7 thru 17 "subs" 1 thru 6 are the main players each week.
I just can't seem to figure out how to populate the comboboxes when activated, I don't want to use the drop down
if I don't need to, 95% of the teams will play the same 6 players, so if their names are already there, I only have to
click on an option button that matches how many games they won 0,1,2, or 3 and the score is inputted.
if this isn't possible please let me know and I will attempt to figure out another way.
Thanks
Keith
Hi, Quicksnot,
I cut off the RowSource for all ComboBoxes and adjusted ComboBox2 to be filled when you enter the dropdown (UserForm11):
Ciao,Please Login or Register to view this content.
Holger
thanks HaHoBe, but I must be doing something wrong, or explaining it wrong, I don't need anything done to the userfom workbook, I
just need what it does to the workbook below.
Thanks
Keith
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks